Reply to Re: Accessing string arrays

Your name:

Reply:


Posted by Peter Pei on 09/29/46 12:01

How amazing this is. His code worked with 5.2.5 for sure. Obviously none of
the previous repliers cared to test his code, and went ahead with stupid
answers any way.

His code works 100% as long as he calls it the right way, for example
printArrayStr("age"). Obviously he will get notice if he calls
printArrayStr(age).

make sure your answers is relevant, otherwise you are playing pure stupid.
=============================================
"Giovanni" <blastingproton@gmail.com> wrote in message
news:bfe96afe-98dc-4850-98a8-890b0de68daf@j20g2000hsi.googlegroups.com...
> Hi! I've an array of string like this:
>
> $arraystring["name"]="John";
> $arraystring["age"]="50";
> $arraystring["work"]="teacher";
>
> $arraystring is global variable.
>
> I'm trying to code a function that get a string as parameter and print
> the relative arraystring's value.
>
> function printArrayStr($key)
> {
> global $arraystring;
> echo $arraystring["$key"];
> }
>
> What do I wrong?! :(
>
> tnx, people!

[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

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