Page is a not externally linkable
alphacooler - 12:38 am on Jul 27, 2006 (gmt 0)
So I tried the following preg_replace to strip out extra lines at the end of the string. It doesn't work. I also tried \n instead of \r.
I have a form box where users enter in directions (one per line). I then turn each line into a list item <li>. The problem is that when people enter a blank line at the end it creates a new list item. $directions = preg_replace('/\r+$/','',$_POST['directions']);