note 27536 added to language.operators.array
| From: | amirlaher at rack1 dot php dot net | Date: | Tue, 10 Dec 2002 04:41:51 +0000 |
| Subject: | note 27536 added to language.operators.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40641@lists.php.net to get a copy of this message | ||
[]= could be considered an Array Operator (in the same way that .= is a String Operator).
[]= pushes an element onto the end of an array, similar to array_push:
<?
$array= array(0=>"Amir",1=>"needs");
$array[]= "job";
print_r($array);
?>
Prints: Array ( [0] => Amir [1] => needs [2] => job )
--
http://www.php.net/manual/en/language.operators.array.php
http://master.php.net/manage/user-notes.php?action=edit+27536
http://master.php.net/manage/user-notes.php?action=delete+27536
http://master.php.net/manage/user-notes.php?action=reject+27536