On Friday 03 May 2002 02:43, Jackson Miller wrote:
> I want to do something along the lines of:
>
> $type = "basic";
> $$type_user = "jaxn";
> echo $basic_user;
>
> and have the output be "jaxn".
>
> I have tried everything I can think of, and I have looked in all my
> books.
>
> I know how to:
>
> $type = "basic";
> $$type = "jaxn";
> echo $basic;
>
> but this won't do what I need.  I need the name of the variable to be a
> variable plus some.
>
> I can probably reach my goals using arrays, but I just thought I would
> ask first.

Rather than tying yourself in knots, plus the fact that code using variable 
variables are mostly harder to debug, you are strongly advised to use arrays.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Your love life will be... interesting.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to