Re: breaking apart data

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

 



> 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


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

  Powered by Linux