Skip to content

Instantly share code, notes, and snippets.

@loganlinn
Created August 24, 2012 17:40
Show Gist options
  • Save loganlinn/3453310 to your computer and use it in GitHub Desktop.
Save loganlinn/3453310 to your computer and use it in GitHub Desktop.
<?php
$a = array(
'foo' => 'asdf',
'bar' => 'fdsa',
'baz' => 'test'
);
end($a);
echo "Last key: " . key($a) . "\n";
foreach ($a as $k => $v) {
echo "$k => $v\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment