Archive for June, 2009

Variables Used

Variables are used to temporarily keep or store something that you want to save. When the time comes that you will be needing them, recall the variables and they will give you the information that you stored for you to change, delete or edit it.

$message = "Hello Haroon";
echo "PHP Tutorial";
echo $message;
?>

‘Hello Haroon’ is the information that you want to save temporarily, while the message ‘PHP Tutorial’ is displayed.

The output of the program will be: PHP TutorialHello Haroon

In PHP, $ is used to define a variable. PHP, unlike C or Java, is a loose-typing scripting language.