Re: breaking apart data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Chris... that worked great.

Guess I need to spend a _lot_ more time reading the manual.

At 11:28 AM 1/20/2004, Chris Boget wrote:
> 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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Larry R. Sieting


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux