Re: [PHP] array_pop() with key-value pair ???

2007-02-16 Thread Robin Vickery
On 16/02/07, Eli [EMAIL PROTECTED] wrote: Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do: ?php $arr = array('a'=1,'b'=2,'c'=3,'d'=4); $arr_keys = array_keys($arr);

Re: [PHP] array_pop() with key-value pair ???

2007-02-16 Thread Németh Zoltán
2007. 02. 16, péntek keltezéssel 10.23-kor Robin Vickery ezt írta: On 16/02/07, Eli [EMAIL PROTECTED] wrote: Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do:

Re: [PHP] array_pop() with key-value pair ???

2007-02-16 Thread Robin Vickery
On 16/02/07, Németh Zoltán [EMAIL PROTECTED] wrote: 2007. 02. 16, péntek keltezéssel 10.23-kor Robin Vickery ezt írta: On 16/02/07, Eli [EMAIL PROTECTED] wrote: Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason

Re: [PHP] array_pop() with key-value pair ???

2007-02-16 Thread Németh Zoltán
2007. 02. 16, péntek keltezéssel 10.47-kor Robin Vickery ezt írta: On 16/02/07, Németh Zoltán [EMAIL PROTECTED] wrote: 2007. 02. 16, péntek keltezéssel 10.23-kor Robin Vickery ezt írta: On 16/02/07, Eli [EMAIL PROTECTED] wrote: Hi, Why isn't there a function that acts like

Re: [PHP] array_pop() with key-value pair ???

2007-02-16 Thread Eli
Robin Vickery wrote: On 16/02/07, Eli [EMAIL PROTECTED] wrote: Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do: ?php $arr = array('a'=1,'b'=2,'c'=3,'d'=4); $arr_keys =

[PHP] array_pop() with key-value pair ???

2007-02-15 Thread Eli
Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do: ?php $arr = array('a'=1,'b'=2,'c'=3,'d'=4); $arr_keys = array_keys($arr); $key = array_pop($arr_keys); $value =