Link to home
Start Free TrialLog in
Avatar of n00b0101
n00b0101

asked on

Wordwap at character instead of #?

Is it possible to do something like wordwrap, but inserting a new line after a certain character (in my case: >), instead of after a certain number of characters?
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
$theString = "This is a simple>Test of replacing a less than with a >New Line and a less than";

$theString = str_replace( ">", ">\n", $theString );