FramezArt Posted February 25, 2008 Share Posted February 25, 2008 I am somewhat new to PHP coding and i hope this doesnt come off as to basic... for some reason i cant get php code to show up when i put it in a variable: for instance: $var = "<?php echo $title; ?>" $table = "$var" doesnt show any result. when i look at the source on the test site i am working on, it shows that it just writes <?php echo ; ?> in the html but it doesnt run it... is there a solution to this? Thanks! Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted February 25, 2008 Share Posted February 25, 2008 Oum if your trying to exchange variable data, Just use $var = $title; also, for just a variable to variable you don't need to enclose it in ""'s or you will get something like <?php echo $title; ?> or $var Quote Link to comment Share on other sites More sharing options...
freenity Posted February 26, 2008 Share Posted February 26, 2008 Wait what do you really want to do?? $var = "<?php echo $title; ?>" // here you put "<?php echo $title; ?>" to $var. You put the string, you dont print $title. You just put this string as it is..... $table = "$var" // here again you put "$var" string to $table. NOT its value. Not sure what you want to do with this. 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.