Hi Kevin,
I find it a bit awkward to mix variables and arrays in a pseudo
array. But I guess you have reasons...
Anyhow, maybe this is what you want:
$variable1="one";
$variable2="two";
$variable3 = array();
$variable3[0]="three";
$variable4 = array();
$variable4[0]="four";
$j=1;
wh
septiembre de 2002 13:38
Para: php-general
Asunto: [PHP] generating variable names
Hoping someone can help me with this. Below I have an example of what
I'm trying to accomplish.
Bottom line.. I need to print out $variable3[0] and $variable4[0] and my
problem is that I'm trying to gen
Hoping someone can help me with this. Below I have an example of what
I'm trying to accomplish.
Bottom line.. I need to print out $variable3[0] and $variable4[0]
and my problem is that I'm trying to generate the variable name. I can
get this to work with $variable1 and $variable2 which are not a
You can allso do like this:
$i = 1;
${"test". $i} = "123";
echo $test1;
___
Marcus Rasmussen
[EMAIL PROTECTED]
On 21-09-01 at 11:21 _lallous wrote:
>you can always use eval to create a variable too!
>
>$i = 1;
>eval("\$test$i=123;");
>echo $test1;
>?>
>
>
Hi there,
How do I generate variable names 'on the fly'? I wish to have variable
names along the lines of $genre_category_1, $genre_category_2,
$genre_category_3 etc.
Ideally it would be along the lines of this...
###
$current_field_number = 1;
$genre_number_fields = 7;
whi
5 matches
Mail list logo