dasein Posted March 12, 2011 Share Posted March 12, 2011 I'm trying to run a readout of a db which runs fine as an individual script. When I embed it in PHP inside an html div container, it bails when it encounters the first ">" and simply outputs the PHP characters from there through the "?>". The rest of the html runs fine before and after. For example, this line echo "<select>"; would output "; and any other php script up to the ?> end, after which it renders html fine. If I run the script as a separate php file, it runs as expected. Any help would be appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/230394-php-w-in-div/ Share on other sites More sharing options...
trq Posted March 12, 2011 Share Posted March 12, 2011 Post your code. Link to comment https://forums.phpfreaks.com/topic/230394-php-w-in-div/#findComment-1186489 Share on other sites More sharing options...
kenrbnsn Posted March 12, 2011 Share Posted March 12, 2011 What's the name of the file that contains the code. If it doesn't end in ".php", the php processor won't be invoked (in most cases). Ken Link to comment https://forums.phpfreaks.com/topic/230394-php-w-in-div/#findComment-1186492 Share on other sites More sharing options...
dasein Posted March 12, 2011 Author Share Posted March 12, 2011 Thanks, kenrbnsn. My dumb. I had php in html. html in php works. Appreciate it! Link to comment https://forums.phpfreaks.com/topic/230394-php-w-in-div/#findComment-1186494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.