warning - decent css/html skills and reasonably sharp but a total php noob.
In one of the html input fields of the content management (heavily tweaked wordpress and equally customized nextgen gallery) setup I wish to achieve automatic paragraphs. As the field I wish to have this at is the image description a <P> infront every word will not work for me. It would make for an ugly mouse hover tooltip, and search engines would also not be thrilled.
I've been playing with nl2br and nl2p but it's getting the best of me and I can't figure it out.
This is the php field corresponding in the content manager
Code: Select all
<textarea name="alttext[<?php echo $pid ?>]" style="width:95%; margin-top: 2px;" rows="6" ><?php echo stripslashes($picture->alttext) ?></textarea>Code: Select all
<textarea name="alttext[<?php echo $pid ?>]"<?php function nl2p($pid) {return "<p>" . str_replace("\n", "</p><p>", $pid) . "</p>";}?> style="width:95%; margin-top: 2px;" rows="6" ><?php echo stripslashes($picture->alttext) ?></textarea>Orko

