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 Quote Link to comment 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); Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.