PHP: How to prevent unwanted line breaks
问题 I'm using PHP to create some basic HTML. The tags are always the same, but the actual links/titles correspond to PHP variables: $string = '<p style="..."><a href="'.$html[$i].'"><strong><i>'.$title[$i].'</i></strong></a> <br>'; echo $string; fwrite($outfile, $string); The resultant html, both as echoed (when I view the page source) and in the simple txt file I'm writing to, reads as follows: <p style="..."><a href="http://www.example.com "><strong><i>Example Title </i></strong></a></p> <br>