You are here: Re: How to extract from array « PHP Programming Language « IT news, forums, messages
Re: How to extract from array

Posted by harvey on 05/15/07 15:05

In article <1179239519.982538.109300@p77g2000hsh.googlegroups.com>,
zeldorblat@gmail.com says...
> $a = array('foo' => 'bar', 'baz' => 'bop');
> end($a); //set the pointer to the end of the array
> $lastKey = key($a);
> $lastValue = current($a);
>
>

Aha - I found end() in the docs but missed the key() command -

The above does the trick nicely for me

thank you.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация