I want to select the values from the last key array.
I have this array:
Array
(
[01] => Array
(
[cat_id] => 15
[offset] => 4951
)
[02] => Array
(
[cat_id] => 15
[offset] => 4251
)
[03] => Array
(
[cat_id] => 15
[offset] => 4001
)
)
To get the last key here is my code:
end($completed_steps);
$lastKey = key($completed_steps);
But how can I get the values of the last key? Like, I want to get cat_id and offset.
(sorry for late response, here's an additional note, I had to confirm this first from someone.)
NOTE: I want to store those values as variables. I think I have the idea now.
["cat_id","offset"]or["15","4001"]? or any other output ?