Code

Website Theme

PHP repetition control structures

September 1st, 2012

A control structure is block of code that is executed based on a condition. A repetition control structure repeats program statements based on the evaluation of a condition. PHP has the following repetition control structures:

  • For loop
  • Foreach loop
  • While loop
  • Do while loop

Let’s take a look at how each of these repetition control structures function.

Read more »»

PHP functions

August 29th, 2012

A good programming practice is called Do not Repeat Yourself (DRY). The idea is that you attempt to maximize code reuse. One way to do this is to write functions. A function is a block of code that you write once and then you can execute it multiple times from other parts of your code. Executing a function is called “calling” it. PHP allows you to write functions quite easily.

Read more »»

PHP Variables and constants

March 2nd, 2007

Variables introduction

Variables are used by programmers to store values and to refer to those values in code. Variables in PHP need not be defined. Variable types also do not exist although variable scope does. All variables begin with a $ sign. Variable names can contain numbers, letters and underscores. Variable names can only begin with letters or underscores. PHP variables are case sensitive. For ex: $a is different from $A. Below are given some examples of valid variable names:

Read more »»

Standards based coding is easy

October 6th, 2006

Coding according to w3c standards is a major selling point for website designers these days. But how hard is it really? Consider some of the differences between valid XHTML transitional and the usual sloppy HTML coding:
Read more »»

PHP introduction, code delimiters, comments and statements

September 18th, 2006

Introduction

PHP Hypertext Preprocessor (PHP) is the most popular server-side scripting language on the world wide web. This guide is designed to introduce programmers familiar with other programming languages to PHP.

This guide will take the form of a series of posts that will cover PHP from the basics to intermediate level. In this post I will cover code delimiters, comments and PHP statements.

Read more »»

Domain for sale

This domain name is for sale. If you are interested in buying it please contact me.