Re: variable problem - help!
| From: | Dani | Date: | Wed, 16 Jan 2002 14:58:38 +0000 |
| Subject: | Re: variable problem - help! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80685@lists.php.net to get a copy of this message | ||
Thanks for the reply!
I really appriciate it!
I'll try it first!
regards,
Dani
Stefan Rusterholz wrote:
> > Hi!
> >
> > I 'm trying not to hard code my php coding and I'm trying to pass a
> > variable name into the $row[coloumname_$variable];
> $row["columname_$variable"] should do it.
> $row[constant] is threaten as constant which is normally not the programmers
> intention (set_error_reporting(0) and you'll see PHP's complaints about it)
> so PHP converts it to $row['constant'].
> You may now understand, that PHP "translates" your code to
> $row['coloumname_$variable'] whre $variable is a string and not a variable.
>
> I hope, I could express myself understandable :)
> best regards
> Stefan Rusterholz