PHP Tutorial – Variables

In this article I discuss PHP variable declaration and initialization, naming rules and conventions, and using variables in expressions and statements. I’ll also examine two methods of referencing one variable from another: variable variables and references.

PHP Tutorial – Basic Syntax

In this article we’ll take a look at some basic PHP syntax topics that explain how the PHP interpreter treats source files containing a mixture of HTML and PHP. We’ll discuss tags that the PHP interpreter recognizes as delimiters of PHP code. We’ll look at the concept of expressions and statements in PHP and what the echo statement does. We’ll also take a look at how to embed comments in your programs in order to document the code.

PHP Tutorial – Introduction

PHP is undoubtedly one of the most popular programming languages in use today. This is the first in a series of articles that will teach you how to program in PHP. I intend to cover the core language including variables, constants, data types, operators, strings, arrays, branching, looping, functions, objects, files, directories, web development, and MySQL access.

Saucy Salamander Cookbook

Ubuntu Desktop 13.10, also known as “Saucy Salamander” was recently released. This article provides a “no frills” recipe for building a LAMP (Linux, Apache, MySQL, PHP) development environment on Salamander, including OpenJDK and NetBeans IDE. The entire environment is housed in a VirtualBox VM running on Windows 7. We’ll finish up by cloning the VM for a particular project.

Installing MySQL on Ubuntu Desktop

MySQL is the most popular open source database management system in use today and is a component of the LAMP architecture (Linux, Apache, MySQL, PHP). In this article we complete the LAMP stack by installing MySQL on our Ubuntu Desktop virtual machine. I’ll demonstrate how to install MySQL Server as well as a couple of useful development/administration tools: phpMyAdmin and MySQL Workbench. I’ll also walk through the creation of a basic Web page that tests the integration of the components.

Installing PHP on Ubuntu Desktop

PHP is one of the most popular programming languages used for Web development and is a component of the popular open-source LAMP architecture (Linux, Apache, MySQL, PHP). In this article I will demonstrate how to install PHP on Ubuntu Desktop and provide an overview of configuring the interpreter. In a future article, I’ll show how to install MySQL on the platform to complete the build-out of a LAMP development environment on Ubuntu Desktop.

Dissecting WordPress Themes Part 11: Page Hierarchy

In this article we’ll explore the template hierarchy for pages. We’ll first create a few pages in our development instance and take a look at the default page display using the template of last resort, index.php. We’ll then begin to layer on templates from the hierarchy, demonstrating how each more specific template overrides its more general parent. We’ll examine the role of custom page templates in the hierarchy by creating one and assigning it to a few of our pages. Finally, we’ll observe how we can use page templates to design pages with both static and dynamic content.

Dissecting WordPress Themes Part 10: Post Type Hierarchy

In this part we wrap up our discussion of post archives with the custom post type archive hierarchy. WordPress allows you to achieve special formatting for a particular custom post type by using the archive-[post type].php template, where [post type] is the name given to our custom post type. This template overrides archive.php, which is a common template for all archive pages. We will also learn how to generate the link for a custom post type archive and exclude the archive page from the merging of normal posts and custom posts that we implemented on the other archive pages.

Dissecting WordPress Themes Part 9: Taxonomy Hierarchy

You are no doubt familiar with the built-in WordPress taxonomies: categories and tags. You can also create your own independent custom taxonomies, complete with an administration screen UI for managing terms and automatic archive searches. In this article we will continue our exploration of the archive hierarchies by examining the custom taxonomy archive. We’ll create a non-hierarchical custom taxonomy, add terms to it, and assign those terms to our existing posts. We’ll then implement the taxonomy templates to demonstrate how each more specific template overrides its more general parent in the template hierarchy. We’ll finish up with a brief look at the wp_tag_cloud() call to create a term cloud in our footer.php template.

Dissecting WordPress Themes Part 8: Date Hierarchy

WordPress provides the ability to filter posts based on particular publishing timeframes such as for a day, month, or year. For example, blog readers may click on a month link to see a list of posts published during that month. As with all archives, the date-based archives will use the archive.php template file if it is available in the theme, otherwise index.php will be used. Additionally, a theme developer may provide special formatting for date archive pages by overriding archive.php with date.php. Although there are not templates for individual date timeframes, conditional tags may be used to provide formatting specific to day, month, or year archives if needed. In this article, we’ll assign publication dates to our existing posts and use these to demonstrate the date archive hierarchy. We’ll also create simple month and year links in our sidebar.php and footer.php templates.