Re: how to get var value
| From: | Jacky@lilst | Date: | Fri, 27 Apr 2001 14:01:19 +0000 |
| Subject: | Re: how to get var value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50534@lists.php.net to get a copy of this message | ||
why don't you assign in next page like this?
$newvar = $test;
Jack
jacky@activelifestyle.com
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: AJDIN BRANDIC <abrandic@coventry.ac.uk>
To: <php-general@lists.php.net>
Sent: Thursday, April 26, 2001 5:53 AM
Subject: [PHP] how to get var value
> Hi,
>
> (this is just an example)
> I have on one page
>
> $test=1;
> $var1='test';
>
> on another page I want to be able to construct variable from the value in
> $var1 (test in this case) and print its value. So,
>
> $newvar=$;
> $newvar.=echo"$var1";
>
> now $newvar contains string '$test' but not the value of $test (1 in this
> case).
>
> There has to be way aroud this but I am just cannot find it :(.
>
> Regards
>
> Ajdin
>
> --
> 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
>
>