Echo current ($attr); Takes the value of the current element
echo Key ($ATTR); Takes the key of the current element
Next ($ATTR); Point the pointer inside the array to the next (Move Down)
Prev ($attr); Point the pointer inside the array to the previous (move up)
End ($ATTR); Point the pointer to the last
Reset ($attr); Reset the pointer
/*while (Next ($attr))
{
Echo current ($attr). " <br> ";
}*/
/*do
{
Echo current ($attr). " <br> ";
}
while (Next ($attr)) */
Global variables
/* $a = 10;
function Show ()
{
$a = 8;
Global $a;
echo $a;
}
Show (); */
//var_dump ($_server);
//var_dump ($_env);
$_post//POST Value submitted $_get//Submit GET value $_request// The Get or Post value submitted
$_files User-submitted file information
//var_dump ($_files);
echo count ($attr); Gets the number of array elements
var_dump (In_array ("Aaaac ", $attr)); Determines whether the element is inside an array
$attr = Array_reverse ($ attr); Flip array
$attr = Array_unique ($attr); The elements of the array are de-weighed
unset ($attr ["]");// Delete an element inside an array
$attr = Array (1,2,3,4,5,6);
$attr 1 = array (9,10);
Unset ($attr [2]);
$attr = Array_values ($attr); Re-establish Index
$attr = Array_merge ($attr, $attr 1); Merging arrays
Adding elements to an array
Array_push ($attr, 10); Append, Function Way
$attr [] = 10; How to assign a value
Traversal of PHP------arrays