note 38788 deleted from language.references.whatdo by didou
| From: | didou@php.net | Date: | Wed, 07 Jan 2004 10:35:17 +0000 |
| Subject: | note 38788 deleted from language.references.whatdo by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63055@lists.php.net to get a copy of this message | ||
Note Submitter: The_Spide
----
I found this very helpful to know when I wanted to neaten up my code.
<?PHP
$graph = array(
array("name" => "line1",
"points" => array()
);
);
$line1 =& $graph[0]["points"];
// can now use the shorter: $line1[] =
// instead of the full: $graph[0]["points"][] =
$line1[] = "0,0";
print_r ($graph);
?>
will output as expected
Array (
[0] => Array (
[name] => line1
[points] => Array (
[0] => 0,0
)
)
)