PHP listers,
I recently got some help here to fix a str_replace() command.
The string works, and the output from the browser looks right. However,
I would like to further tweak the code so that the HTML source is also a
little cleaner than it is now.
The code in question is this:
$charInfoCss = "<p class=\"content\">" . str_replace("\n", "</p>\n<p
class=\"content\">", $charInfo[introE]) . "</p>";
echo $charInfoCss . "\n";
The way this outputs to the HTML source is like this:
<p class="content">blah blah blah blah
</p>
<p class="content">blah blah blah blah
</p>
<p class="content">blah blah blah blah
</p>
Shouldn't the syntax that I have place the new line *after* the
</p> tag? I'm trying to get it to look like this:
<p class="content">blah blah blah blah</p>
<p class="content">blah blah blah blah</p>
<p class="content">blah blah blah blah</p>
Any advice would be most welcome.
--
Yoroshiku!
Dave G
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php