I'm am trying to remove multiple line breaks ("\n"). Here's my code:
$imageStr = trim($_POST['images']);
$imageStr = str_replace("\n\n", "\n", $imageStr);
----------
$_POST['images'] is a textarea field, and I am trying to remove extra
hard returns that a user types into the text area.
When I change the code to:
$imageStr = str_replace("\n", "%", $imageStr);
it works fine. So I know the function works and I have the right
character ("\n").
Anyone know what I'm doing wrong?
thanks much,
jon
jlarosa at alumni dot brown dot edu