<?
$x = false; # boolean
$x = true;
$x = 10; # decimal
$x = 1.45; # Floating point
$x = 0x1A; # hexadecimal
$x = "mmm\"oo'oo\n"; # string = mmm"oo'oo +return in the end of the line
$x = 'mmm"oo\'oo\n'; # string = mmm"oo'oo\n
$y = &$x # Reference
$x[1] = 10 # array of decimals
$x["name"] = "shlomi"; # associative arrays
$arr[] = "lalala"; # push "lalala"
$x[2]["lala"] = "xx"; # two dimensional
$name = "shlomi";
$animals = array("dog" => "azit" , "cat" => "mitzi");
echo "hello ! My name is $name and my dog's name is ${animals['dog']}";
?>
|