Hello,
I need a solution to get array key and value pair for first array item only. The array will be like array('key' => 'value'). If there is other items, they will be skipped.
I understand how to get key/value pairs with internal foreach cycles. Should I code with same approach and count and break the cycle after 1st item?
There would be nice to have helper functions like these ones:
phalcon_array_reset(zval *array) - resets the cursor of an array
phalcon_array_current(zval *array) - gets current item (key/value pair) of an array
phalcon_array_next/prev
phalcon_array_first/last (get first or last element of an array?)
Like PHP's reset/next/prev/current functions.
Thanks.
Hidayet Dogan