taith Posted June 2, 2007 Share Posted June 2, 2007 anyone know/have a function lik highlight_string(), that doesnt require/need you to ob_start() to get the info into a string? Link to comment https://forums.phpfreaks.com/topic/53975-solved-highlight_string/ Share on other sites More sharing options...
wildteen88 Posted June 2, 2007 Share Posted June 2, 2007 Huh? Could you explain what you are trying to do. Not understanding your question. Link to comment https://forums.phpfreaks.com/topic/53975-solved-highlight_string/#findComment-266827 Share on other sites More sharing options...
taith Posted June 2, 2007 Author Share Posted June 2, 2007 well... if you highlight_string() it automatically outputs it to the browser, so you have to ob_start()/ob_get_contents()/ob_end_clean() to get it into a string... i just want a function that does that without being tempermental... lol Link to comment https://forums.phpfreaks.com/topic/53975-solved-highlight_string/#findComment-266838 Share on other sites More sharing options...
obsidian Posted June 2, 2007 Share Posted June 2, 2007 Just check the manual. You'll find that the function has an optional boolean second parameter. If it is set to TRUE, it returns the string rather than automatically outputting it to the browser: <?php $out = highlight_string($string, TRUE); ?> Link to comment https://forums.phpfreaks.com/topic/53975-solved-highlight_string/#findComment-266844 Share on other sites More sharing options...
taith Posted June 2, 2007 Author Share Posted June 2, 2007 really? musta missed that... THANKS! Link to comment https://forums.phpfreaks.com/topic/53975-solved-highlight_string/#findComment-266847 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.