It\'s as easy as the title sounds; I need to get the index/key of the last inserted item. Why is this difficult? See the following two code samples:
$a=array
Bah, looks like I've found the answer by myself:
$last_id = array_pop(array_keys($a));