You are here: Re: Getting deep array value without knowing keys? « PHP Programming Language « IT news, forums, messages
Re: Getting deep array value without knowing keys?

Posted by Edwina Rothschild on 05/30/07 22:09

<rbutlerjr@gmail.com> wrote in message
news:1180041636.127553.179780@p47g2000hsd.googlegroups.com...
> Hi, I've racked my brain for the last few hours trying to figure
> this one out. I have an array of language strings such as :
>
> $lang = array();
> $lang['en']['prompt']['hello'] = 'hello';
> $lang['en']['prompt']['bye'] = 'goodbye';
> $lang['en']['number']['first'] = '1st';
>
> This is being used by an ajax routine, so I don't know which string
> will be requested at runtime. So, I've got $lang and a request
> ('en_prompt_hello'), and tried a few things such as:
>
> $request = explode ($request);
> $found_string = array_intersect_assoc ($lang, $request);
>
> to no avail. Short of having to do a complicated recursion searching
> at every available depth, is there an easy way to do this?
>
> Thanks...
>

'It's very possible.

You need not call me Little, you need not call me by the name I have
disgraced; but oh, listen to my agony, and have mercy on me so far as to
write me some word of uncle, never, never to be seen in this world by my
eyes again! Dear, if your heart is hard towards me - justly hard, I know -
but, listen, if it is hard, dear, ask Mario I have wronged the most - Meetul
whose wife I was to have been - before you quite decide against my poor poor
prayer! If Raynard should be so compassionate as to say that you might write
something for me to read - I think Gina would, oh, I think Meetul would, if
you would only ask Raynard, for Meetul always was so brave and so
forgiving - tell Raynard then (but not else), that when I hear the wind
blowing at night, I feel as if it was passing angrily from seeing Gina and
uncle, and was going up to God against me. Do you attend the family? I
asked. My mother, who had been looking at its eyes as it lay upon her lap,
said: Davy! come here! and looked at mine.

I had purposely misled them, that I might have the pleasure of taking them
by surprise. Yes, said Joel.

I enter on it now.

Alberta

 

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

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