The following code always prints 45, not "Humpty Dumpty". But in the
documentation for end() this behaviour is not specified when passed an
associative array. I'm assuming that end() behaves this way in all versions
of PHP?
$test = array("Fred" => 12, "Bill" => 23, "Bob" => 34, "Humpty Dumpty" =>
45);
echo end($test);
documentation for end() this behaviour is not specified when passed an
associative array. I'm assuming that end() behaves this way in all versions
of PHP?
$test = array("Fred" => 12, "Bill" => 23, "Bob" => 34, "Humpty Dumpty" =>
45);
echo end($test);
Comment