Re: Still cnanot figure out with much easier example...
| From: | news.php.net | Date: | Sun, 30 Jan 2005 23:09:43 +0000 |
| Subject: | Re: Still cnanot figure out with much easier example... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207724@lists.php.net to get a copy of this message | ||
Just compare the output of print_r($arr) and foreach(...)... !!! Please,
explain, or my understanding of the php is gonna ruin.
Thanx, Mark.
<?
$as = array();
$a10 = "10";
$a20 = "20";
$a = &$a10;
$arr[] = &$a;
$a = &$a20;
$arr[] = &$a;
print_r($arr);
foreach($arr as $a)
{
echo $a;
}
?>