You are here: Re: array query « PHP Programming Language « IT news, forums, messages
Re: array query

Posted by Schraalhans Keukenmeester on 04/15/07 20:38

Francis S wrote:
> On Apr 15, 1:22 pm, Schraalhans Keukenmeester <bitbuc...@invalid.spam>
> wrote:
>> Francis S wrote:
>>> $record= array(
>>> "product"=>array(
>>> array("name"=>"apple","price"=>30.5),
>>> array("name"=>"orange","price"=>20)
>>> )
>>> );
>>> echo array_read($record, "[product][0][price]") //out 30.5
>>> print_r (array_read($record, "[product][*][name]")) //out
>>> array("apple","orange")
>>> echo array_read($record, "[product][*=>(name=orange)][price]") //out
>>> 20
>>> echo array_read($record, "[product][(*)=>(price>20)][name]") //out
>>> "apple"
>>> echo array_read($record, "[product][(0)=>(name=orange)][price]") //out
>>> null
>>> echo array_read($record, "[product][(1)=>(name=orange)][price]") //out
>>> 20
>>> http://pleiadesworks.blogspot.com/2007/04/query-array-easier-way-to-r...
>> array_read() is not in my PHP manual. I don't really see the points you
>> are trying to make here or on your blog. You're surely not just spamming
>> for attention?
>>
>> Sh.
>
> just an idea without using foreach.. . maybe someone can proposals a
> better one
>
And what does array_read() look like in that case? To be honest I had
the same feeling Jerry had, I don't really see a realistic problem being
solved, but I kind'a hoped the magic would be in your array_read(). But
after rereading I still don't see an implementation.

But then I've been known to make a fool of myself more than once, so I'm
here with two leges ready for pulling. Surprise me!

Sh.

 

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

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