reference array value from inside itself
Posted: Fri Oct 08, 2010 4:32 pm
I'd like to reference an array value from within itself. Is there a way to do this?
example:
example:
Code: Select all
<?php
$test = array('1' => 'foo',
'2' => 'bar',
'default' => $test['2']);
print $test['2']; //bar
print $test['default']; //bar
?>