peter11 Posted June 3, 2010 Share Posted June 3, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/203790-how-to-echo-inside-variables/ Share on other sites More sharing options...
Alex Posted June 3, 2010 Share Posted June 3, 2010 In that code you're using $sp1 before you're defining, which you obviously can't do. Quote Link to comment https://forums.phpfreaks.com/topic/203790-how-to-echo-inside-variables/#findComment-1067313 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.