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? Quote 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. Quote 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 Quote 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); ?> Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/53975-solved-highlight_string/#findComment-266847 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.