Reply to Re: array keys

Your name:

Reply:


Posted by pakalk on 08/22/07 06:48

On Aug 22, 3:58 am, pc <chavanpr...@gmail.com> wrote:
> I was wondering if there is a more gracious way to write the below
> code:
>
> //$input is an array .I just need its 0th and 2nd key-not the 1st.I
> want to avoid using temp
>
> $temp=array_keys($input);
> print $temp[0];print $temp[2];

Yeah, to write..

$tmp = array_keys( $input );
echo $tmp[0], $tmp[2];

[Back to original 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

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