Jump to content

how to echo inside variables?


peter11

Recommended Posts

hi all im haveing problems with this.

 

$q1 =  $_POST["q1"];
$message = ($sp1).($q1);
$sp1 = "Once went on a trip to ";
$ap1 = "<input type='text' name='q1' />";

 

if i run this it will display what ever was entered in the input box however wont show "sp1" I have tried echo'ing sp1 but it wont let me do that and still carry out the $message.

 

Please note the code is not in order. This is just snippits of the code im haveing problems with. also "sp1" and "ap1" are in another file. They needs to be.

 

Any ideas?

 

thanks in advance.

 

Link to comment
https://forums.phpfreaks.com/topic/203790-how-to-echo-inside-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.