HappyPandaFace Posted April 8, 2007 Share Posted April 8, 2007 I want to make it so the name of a variable is changed by '$z' I'm not sure how to do this. Right not I'm trying: [$row + $z] = 1 But it doesn't work. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 8, 2007 Share Posted April 8, 2007 ok, i have no idea in what your saying...l could you please expand and explain please Quote Link to comment Share on other sites More sharing options...
HappyPandaFace Posted April 8, 2007 Author Share Posted April 8, 2007 I can do this in FLASH 8. I want to make it so if: $z = 1; then: [$var + $z] = 1; would write the number '1' to the variable $var1, which is what [$var + $z] is. The variable $var1 would be the same thing as the variable [$var + $z] Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 8, 2007 Share Posted April 8, 2007 ok, if your saying that the new variable would be called "varz" then ill have to think about it, or if your simply adding the two variables together, and rigging so it always == 1 please let me know Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 Are you trying to create a new variable named $varz that has a value of 1? if($z == 1){ $varz = 1; } hmmm? Quote Link to comment Share on other sites More sharing options...
HappyPandaFace Posted April 8, 2007 Author Share Posted April 8, 2007 No. I want to create the name of a variable and have it have $z at the end of it. like if it was [$var + $z] = 1 and $z = 2 it would be $var2 = 1 I do this with flash all the time. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 this is php, not flash, they are two completely different languages. I'm not sure if this is possible in php. Quote Link to comment Share on other sites More sharing options...
HappyPandaFace Posted April 8, 2007 Author Share Posted April 8, 2007 Hmmmmm..... That sucks Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 It does indeed, I would compare flash and php like Iw ould php and javascript, they are completely different, though there are some similarities. Quote Link to comment Share on other sites More sharing options...
HappyPandaFace Posted April 8, 2007 Author Share Posted April 8, 2007 So can flash have arrays? Quote Link to comment Share on other sites More sharing options...
Barand Posted April 8, 2007 Share Posted April 8, 2007 <?php $z = 1; $varname = 'var'.$z; $$varname = 4; echo $var1; //--> 4 ?> Quote Link to comment Share on other sites More sharing options...
HappyPandaFace Posted April 8, 2007 Author Share Posted April 8, 2007 Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.