Re: inserting a variable into a variable
| From: | Hasan Niyaz | Date: | Wed, 20 Jun 2001 14:55:06 +0000 |
| Subject: | Re: inserting a variable into a variable | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54541@lists.php.net to get a copy of this message | ||
Michi,
Yours did the trick...
thank you and everyone else who contributed.
Hasan
----- Original Message -----
From: <mailing_list@gmx.at>
To: "Hasan Niyaz" <hasan@impex.com.mv>
Cc: <php-general@lists.php.net>
Sent: Wednesday, June 20, 2001 11:46 AM
Subject: Re: [PHP] inserting a variable into a variable
> > I have come to a situation where I am having a variable inside another
> > variable.
> > for example.
> >
> > $rm_$cat_adt
>
> This works for me:
>
> <?
> $cat="def";
> ${"abc_".$cat."_ghi"}=TEST;
> echo '"abc_".$cat."_ghi" =
> '.${"abc_".$cat."_ghi"}."<br>\n";
> echo '"abc_def_ghi" = '.$abc_def_ghi."<br>\n";
> ?>
>
> michi
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
> --
> GMX Tipp:
>
> Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
>
> http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a
>
>