Not sure how to do this but I have a call to a database which pulls the contents of a table into an array and I need a eregi string which will sift through the contents and put a line break (i.e. \n or <br>) after each ";", "}" or "{". here is what I have so far...
function callback(&$value,$key) { $value = preg_replace('/([;{}])/',"$1\n",$value); }
while($b = mysql_fetch_array($sql)) {
array_walk($b,'callback');
And then continue on as normal.
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php