Tutorials Category

PHP Operators: Assignment

Monday, February 11th, 2008

The main assignment operator is ‘=’, which basically assigns a value on the right to a variable on the left. If you think this is the same as an equal sign in mathematics, don’t! Think of it as a ‘assigned to’ so whatever is on the right is assigned to the left.

Here’s a simple example:

(more…)

PHP Operators: Maths

Thursday, January 31st, 2008

There are various kinds of operators used in PHP, but we’re going to start with the most basic and commonly known operator - the Math operators.

What are operators? They are basically a special set of characters (or symbols, if you like) which tells PHP to perform a certain operation. For example, the ‘+’ (plus sign) is used for arithmetic adding of 2 values or variables.

Now you know why I’m starting with the Math operators, cos anyone who has had any basis schooling in Mathematics will be familiar with the Math operators.

(more…)

Using comments in your PHP scripts

Wednesday, January 23rd, 2008

Adding comments to PHP code is a very useful practice. Comments allows you to add some descriptive text that you can use to document or remind you on what the various parts of the PHP script is doing.

Comments are not sent to the browser, so it won’t be visible in the actual page you load in your browser, but it will be visible in your text editor you use for writing your PHP script.

(more…)

Introducing PHP Variables

Friday, January 18th, 2008

In PHP, you can use something called a ‘variable‘ to store values or reference to things. It’s like a container which you can put some thing or things inside which can be easily passed around.

(more…)

Writing your first PHP script

Tuesday, January 15th, 2008

Now that you know how to use XAMPP Lite, it’s time to write your first PHP script.

This tutorial will guide you on writing your first PHP script, show you how the PHP syntax is used, and where to put and run your PHP pages in XAMPP.

Note: this tutorial assumes you are using XAMPP Lite environment for your PHP scripts. If you want to setup your own XAMPP Lite environment, follow this tutorial about installing XAMPP Lite on a portable device.

(more…)

Using XAMPP Lite for PHP scripting

Tuesday, January 8th, 2008

Now that you know how to setup your XAMPP Lite, it’s time to find your way around XAMPP Lite, and get ready for your first PHP script.

This post will highlight some of the features available in XAMPP, and what you do with them. It’s just a simple overview, so don’t expect anything in detail. Those will follow in later posts.

(more…)

Installing XAMPP Lite on a Portable Storage device

Thursday, January 3rd, 2008

One of the fastest and best way to get a PHP server environment up and going is to use XAMPP. What is XAMPP you say?

Put together by the folks at Apache Friends, XAMPP is an installer package containing the Apache Web Server, MySQL, PHP and Perl. XAMPP takes away the hassle and headache of installing and configuring each of the parts individually. But best of all – It FREE!

(more…)

Google