Re: how to combine the results of two variables to echo another variable?
- From: Hannes Dorbath <light@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 02:09:36 +0200
There is no need for variable variables at all. Use arrays for stuff like this. Yeah, v-vars are indeed powerfull, powerfull to lead ppl to unpredictable clutter up the root of the namespace and write ugly code -- like demonstrated below in all beauty.
On 29.04.2005 00:51, Sacs wrote:
Ewoud Dronkert wrote:
Variable variables are one of the most powerfull features of php I've found. Very usefull when you dont know how many variables to be processed in a form for e.g.
for( $i=1; $i <= $num_fields; $i++) { $blah = "field_" . $i; // $blah is now "field_1" first time through the loop
$blah = $$blah; // now $blah holds what was input into the appropriate input }
.
- References:
- how to combine the results of two variables to echo another variable?
- From: Dave
- Re: how to combine the results of two variables to echo another variable?
- From: Sacs
- Re: how to combine the results of two variables to echo another variable?
- From: Ewoud Dronkert
- Re: how to combine the results of two variables to echo another variable?
- From: Sacs
- how to combine the results of two variables to echo another variable?
- Prev by Date: Re: can't proc_open() gpg;
- Next by Date: Re: PLEASE HELP
- Previous by thread: Re: how to combine the results of two variables to echo another variable?
- Next by thread: Re: how to combine the results of two variables to echo another variable?
- Index(es):