MidOhioIT Posted February 13, 2010 Share Posted February 13, 2010 I think my issue is being caused from using the explode function but not sure. I have a form that passes the variable $content $content = $_POST["content"]; to the following function: $mywords = explode('', $content); $finalstring = ''; foreach($mywords as $word) { if(strlen($finalstring) <= 1200) { $finalstring = $finalstring . ' ' . $word; } else { $finalstring = $finalstring . ' .'; break; } } This collects the info and sends to an email. If i put a hyperlink in the textarea that uses content: <a href='http://www.phpfreaks.com'>PHP Freaks</a> I get the following in the email which obvisoulsy does not work because of the "\": <a href=\'http://www.phpfreaks.com\'>PHP Freaks</a> any ideas would be helpful Link to comment https://forums.phpfreaks.com/topic/191989-error-using-explode-function-i-think-anyways/ Share on other sites More sharing options...
sader Posted February 13, 2010 Share Posted February 13, 2010 it looks like you explodeing your string by 0 length string(nothink is actually hapening) use space symbol explode(" ", $str); Link to comment https://forums.phpfreaks.com/topic/191989-error-using-explode-function-i-think-anyways/#findComment-1011951 Share on other sites More sharing options...
MidOhioIT Posted February 14, 2010 Author Share Posted February 14, 2010 I was doing that prior and same issue was happening then also... Link to comment https://forums.phpfreaks.com/topic/191989-error-using-explode-function-i-think-anyways/#findComment-1011985 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.