You are here: Re: function call as an array « PHP Programming Language « IT news, forums, messages
Re: function call as an array

Posted by Steve on 04/25/07 01:22

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:wsidndQz3OmUNbPbnZ2dnUVZ_tzinZ2d@comcast.com...
| Skeleton Man wrote:
| > Hi all,
| >
| > I'm after the PHP equivlent to this Perl construct:
| >
| > print @{[someFunctionCall()]}[0];
| >
| > In the above example someFunctionCall() would return an array, and we're
| > printing the first item from the returned array..
| >
| > How do I do this in PHP ? (without first assigning the output of the
| > function call to a variable)
| >
| > Chris
| >
| >
|
| Chris,
|
| I don't think you can.

currently, you can't in php. you have to return the full array to a variable
and then access the element(s).

 

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

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