jasong
06-22-2004, 02:38 PM
Hey,
I'm trying to combine two variables together to get what it is (ok that made no sense)...
[PHP}
$something_1 = pencil;
$something_2 = book
$X = "1";
while (X <= 2) {
print "$something_.$X" <BR>;
$X++;
}
[PHP]
(if there is something wrong with the loop ignore it, i just put it there to show what i'm doing)
Understand? I want it to call $something_1, and then $something_2.
I've tried a bunch of different combinations of ()'s and "." 's but no such luck.
how do i string the two variables together?
thanks,
Jason
I'm trying to combine two variables together to get what it is (ok that made no sense)...
[PHP}
$something_1 = pencil;
$something_2 = book
$X = "1";
while (X <= 2) {
print "$something_.$X" <BR>;
$X++;
}
[PHP]
(if there is something wrong with the loop ignore it, i just put it there to show what i'm doing)
Understand? I want it to call $something_1, and then $something_2.
I've tried a bunch of different combinations of ()'s and "." 's but no such luck.
how do i string the two variables together?
thanks,
Jason
