note 54185 deleted from ref.array by betz

From: Date: Mon, 27 Jun 2005 05:30:11 +0000
Subject: note 54185 deleted from ref.array by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-90981@lists.php.net to get a copy of this message
Note Submitter: ---- An interesting thing to see how arrays work is present in the following code: <?php $b = 5; $i[] = $b; $i[] = $b; $b = $i; $i[] = $b; ?> <pre><?=var_dump($i) ?></pre> <pre><?=var_dump($b) ?></pre> It will print out something like array(3) { [0]=> int(5) [1]=> int(5) [2]=> array(2) { [0]=> int(5) [1]=> int(5) } } array(2) { [0]=> int(5) [1]=> int(5) }

« previous php.notes (#90981) next »