inferium Posted December 7, 2008 Share Posted December 7, 2008 Let's say that this is an actually good illustration. I want to take a piece of displayed html and have the code for it layed out in a text box at the bottom of the page (I'm finding it hard to describe this in words so this paint image is the best I can do, sorry guys !!! ) Would this be a php maneuver, or is this done through other means? Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/ Share on other sites More sharing options...
jnerotrix Posted December 7, 2008 Share Posted December 7, 2008 If you already have the code you can use his <textarea readonly="1" rows="5" cols="50"> //CODES GO HERE\\ </textarea> Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-708730 Share on other sites More sharing options...
DeanWhitehouse Posted December 7, 2008 Share Posted December 7, 2008 Only other thing i can suggest is using maybe an iframe or ajax and then view-source:http://www.website.com using a regex to find certain bits you want which you would surround in either certain tags or comments. Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-708818 Share on other sites More sharing options...
DarkWater Posted December 8, 2008 Share Posted December 8, 2008 Only other thing i can suggest is using maybe an iframe or ajax and then view-source:http://www.website.com using a regex to find certain bits you want which you would surround in either certain tags or comments. I hope you realize that view-source: is just a browser thing to make lives easier, correct? Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709078 Share on other sites More sharing options...
.josh Posted December 8, 2008 Share Posted December 8, 2008 <?php $html = <<<HTMLSTUFF <html> <head> <!-- header stuff here --> </head> <body> more blah blah blah <a href='http://www.ohtehblah.com'>blah!</a> </body> </html> HTMLSTUFF; echo $html; // example 1 echo "<pre>"; echo htmlentities($html); echo "</pre>"; // example 2 echo "<textarea cols = '80' rows = '10'>"; echo htmlentities($html); echo "</textarea>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709193 Share on other sites More sharing options...
inferium Posted December 8, 2008 Author Share Posted December 8, 2008 Ah, this works great. Thanks!!! Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709535 Share on other sites More sharing options...
DeanWhitehouse Posted December 8, 2008 Share Posted December 8, 2008 @DarkWater, yes and i hope you know you can still use PHP to get what you want from it Quote Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709625 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.