Maybe:

$array = explode("<br>", $string);

foreach ($array as $key => $value) {
    echo "$value";
}

  Would separate the string by <br>'s and print all in one line.


--


  Julio Nobrega.

A hora está chegando:
http://sourceforge.net/projects/toca

"Chad Day" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm trying to pull a string from a database to use in a javascript
> function.. but it's doing line breaks on me, which in turn messes up the
> javascript.
>
> The string in the mysql db is like:
> kjdsakjadk<br>skjdks<br><br>kjkdfjdfkjfd
>
> When I pull it out, it becomes:
>
> kjdsakjadk
> <br>
> skjdks
> <br>
> <br>
> kjkdfjdfkjfd
>
> I've tried replacing the br's with blank spaces or new line characters,
but
> in the html code it still breaks on those breaks when I echo it back out.
> How can I force this string to be all on one line?
>
> Thanks,
> Chad
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to