•Data Types.
–integer, float, boolean, string, array, object, resource, NULL
•Variable Declarations.
–$variablename =
–$anothervariable =& $variablename; (Assign by Reference)
•Array Declarations.
–$arrayname = array();
More on arrays.
$a[0] = "abc";
$a[1] = "def";
$b["foo"] = 13; (Associative subscript).
You can also create an array by simply adding values to the array.
When you assign a value to an array variable using empty brackets, the value will be added onto the end of the array.
$a[] = "hello"; // $a[2] == "hello"
$a[] = "world"; // $a[3] == "world"
Double dimension arrays.
$arr[2][3] = array();
$arr[0][0] = 34;
Array Functions.
•sort(
•asort(
•rsort(
•arsort(
•count(
•count(
•array_push(
•array_pop(
No comments:
Post a Comment