Greetings all,
Due to style sheet stuff I need to modify the nl2br (IE create or use a different function).
I am pulling data from a database and using nl2br, which does the standard.
........... .html:
<div class="ParaFakeOrWhatEver"> some text copy<br /> <br /> Some more copy<br /> </div>
........... .css:
.ParaFakeOrWhatEver { color: #c0c0c0; line-height: 1.5em; margin: 2em; }
What I want instead is <p>Some text copy</p>
<p>some more text copy</p>
Again this is because of css and the designer I am working with. Is there a
maybe something as trivial as a extra few pixels between paragraphs may be time better spent on other parts of the system? this is web not print. and if 'designers' would get that then we wouldn't have to live in <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5"><img src="/images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td valign="top"><img src="/images/header/yyy.gif" width="192" height="61"></td>
<td><img src="/images/spacer.gif" width="1" height="1"></td>
<td valign="top"><a href="target="_blank"><img src="/images/header/xxx.gif" width="66" height="61" style="border: none;"></a></td>
<td><img src="/images/spacer.gif" width="1" height="1"></td>
<td width="100%"> </td>
</tr>
</table> hell any longer, clean simple layout thats not pushed by print media expectations.
built in function that can do something like this or another function out there. So far I cannot see anything. Or is there a way to view the coding of the nl2br function so I can create a new function modifying how it does it.
I'm guess that if you could program C that you would have already downloaded the source and started hacking... so the answer is. yes and probably not at this point in time, my utmost apologies if I am wrong!
Just asking so I do not have to create something from scratch. Thanks.
preg_replace();
-- Blessed Be
Phillip
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php