Jump to content

This may be an easy one to answer...


FramezArt

Recommended Posts

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!

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.