pugboy Posted August 4, 2008 Share Posted August 4, 2008 I am trying to get the output from a textarea, which is posted onto another page. That other page needs to explode at each new line, but it doesn't :/ Is there a limitation of some sort? Link to comment https://forums.phpfreaks.com/topic/118140-solved-explode-question/ Share on other sites More sharing options...
Jabop Posted August 4, 2008 Share Posted August 4, 2008 explode on \n or \r\n? Link to comment https://forums.phpfreaks.com/topic/118140-solved-explode-question/#findComment-607813 Share on other sites More sharing options...
pugboy Posted August 4, 2008 Author Share Posted August 4, 2008 Am using \n on a Linux server. Link to comment https://forums.phpfreaks.com/topic/118140-solved-explode-question/#findComment-607814 Share on other sites More sharing options...
Barand Posted August 4, 2008 Share Posted August 4, 2008 So what have you tried? Link to comment https://forums.phpfreaks.com/topic/118140-solved-explode-question/#findComment-607815 Share on other sites More sharing options...
pugboy Posted August 4, 2008 Author Share Posted August 4, 2008 $s = mysql_real_escape_string($_POST["passwords"]); $array = explode("\r\n",$s); AND $s = mysql_real_escape_string($_POST["passwords"]); $array = explode("\n",$s); I use foreach to submit it into the database, but it is submitted as one big entry. Wait a sec... The newline was being escaped o.O Fixed it, thanks Link to comment https://forums.phpfreaks.com/topic/118140-solved-explode-question/#findComment-607819 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.