Re: How do I make it easier to find the right array?

From: Date: Tue, 09 Jan 2001 20:22:46 +0000
Subject: Re: How do I make it easier to find the right array?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33534@lists.php.net to get a copy of this message
ya sure thats no problem <? $test['one'] = "hello?"; $test['two'] = "hi?"; $test['three'] = "oi"; $where = 'one'; echo $test[$where]; ?> Chris Lee Mediawaveonline.com "Brandon Orther" <brandon@webintellects.com> wrote in message news:CKEMJEADMOCEHPHJKLPAAEHJCCAA.brandon@webintellects.com... > Hello everyone, > > Is there a way I can give an array a name instead of a value? > > like: > > array[PK17] = "6.50"; > > array[PK17] = "3.37"; > > I want to do this so I don't have to loop it until the value of the array is > found, I would like to just call $array[var] and find the price. > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon@webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#33534) next »