I am passing an array to a class which I want to take the array data and
create some variables from the array's keys and values.
So I want to create (in this case 21) new variables that I want to create in
the foreach but with no success.
foreach ($formdata as $key => $value) {
echo "$ke
Thats perfect. I didn't even know about this.
Stut wrote:
>
>
> $$key = $value;
>
> They're called variable variables - search the manual for that term
> for more info.
>
> -Stut
>
> --
> http://stut.net/
>
>
--
View this message in context:
http://www.nabble.com/foreach-loop-to-set
2 matches
Mail list logo