Does anybody know any benifits to using current() and key() I will show two examples of what I mean.
<?php echo "<PRE>"; $arr1 = array(array(1 => 10), array(2 => 12), array(3 => 13), array(4 => 14), array(5 => 15), array(6 => 16), array(7 => 17), array(8 => 18), array(9 => 19) ); foreach ( $arr1 AS $value ) { echo pow(key($value) , current($value))."\n"; } $arr2 = array(1 => 10, 2 => 12, 3 => 13, 4 => 14, 5 => 15, 6 => 16, 7 => 17, 8 => 18, 9 => 19 ); foreach ( $arr2 AS $key => $value ) { echo pow($key , $value)."\n"; } ?> Now for me, these return the same results. I would think that it would be overhead to use current() and key() in the above example. Can anybody point out why the first one would be better to use and why. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php