Re: Trying to read the value of a var...
| From: | Jason Wong | Date: | Sat, 10 May 2003 15:36:46 +0000 |
| Subject: | Re: Trying to read the value of a var... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147120@lists.php.net to get a copy of this message | ||
On Saturday 10 May 2003 22:50, Amanda McComb wrote:
> > > echo $$name2; //HERE, the correct value displays
> >
> > What exactly does it display?
>
> 2 for the first one
>
> 4 for the second
I mean: what does "echo $$name2;" show?
> > > echo $query2;?><BR><? //Here, it displays like this
> > > //$quantity_10
> >
> > And what exactly does this display?
>
> $quantity_10 and $quantity_13
And what does "echo $query2;" show?
> I tried to figure out a way to use an array in this case, but I was
> stumped.
>
> I would need something more like a hash, that would hold both the primary
> key and a quantity. Does php have something like that? Is there a place
> I can go to find an example?
Arrays in php can function like a hash as in Perl but are much more flexible
than that.
manual > Types > Arrays for more details and examples.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Doubt is not a pleasant condition, but certainty is absurd.
-- Voltaire
*/