jemgames Posted March 21, 2007 Share Posted March 21, 2007 Is it possible to put PHP in a echo statement, so that i could, say have something like this: echo('Hello you are visiting this page: <?php echo(PHP_SELF) ?>'); Or whatever? Quote Link to comment https://forums.phpfreaks.com/topic/43717-php-in-echo/ Share on other sites More sharing options...
Orio Posted March 21, 2007 Share Posted March 21, 2007 If you want to echo variables inside a string, do it this way: echo('Hello you are visiting this page: '.$PHP_SELF); Orio. Quote Link to comment https://forums.phpfreaks.com/topic/43717-php-in-echo/#findComment-212219 Share on other sites More sharing options...
cmgmyr Posted March 21, 2007 Share Posted March 21, 2007 <?php echo "Hello you are visiting this page: ".$PHP_SELF; ?> Quote Link to comment https://forums.phpfreaks.com/topic/43717-php-in-echo/#findComment-212220 Share on other sites More sharing options...
jemgames Posted March 21, 2007 Author Share Posted March 21, 2007 That's not actually what I wanted, but thaks anyway. I've worked it out. Quote Link to comment https://forums.phpfreaks.com/topic/43717-php-in-echo/#findComment-212257 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.