Re: breaking apart data

From: Date: Tue, 20 Jan 2004 16:28:15 +0000
Subject: Re: breaking apart data
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32524@lists.php.net to get a copy of this message
> duh (me).... > okay... I am wanting to wrap the lines of text in bullets and perform some > text formatting on it (highlight, bold, underling, etc..) using css classes <script language="php"> function bulletElements( &$arrElement, $key ) { echo '<li>' . $arrElement . '</li>'; } $str = "asdf asdf sadl jf lsakdjf a \r\n asdfierw aweiufasd asiuwr \r\nasdhfauiweuhrahsd \r\n"; array_walk( explode( "\r\n", $str ), 'bulletElements' ); </script> That should do the trick. Chris

« previous php.db (#32524) next »