Good point. Only problem is, if someone hit enter a-million times,
you would end up with a-million spaces where the "\n" characters were.
To take care of that repetition, maybe something like:
while (strpos($textarea_text, "\n\n")) {
.
}
would be one way you could do it.
$new_str =
On Mon, June 13, 2005 12:06 pm, Paul Nowosielski said:
> I'm having a perplexing problem. I'm gather data through a
> html from field and dumping it to MySQL.
>
> I want to display the data as a long string with no carriage returns or
> line breaks in a dhtml div window.
What styles have you ap
Right.. But the browser also should be ignoring the carriage returns
as well, which makes me think the div is set to "white-space: pre;" or
something. He said the text is being formatted in a div exactly how
it is entered into the system. By default, a div does not render any
carriage returns.
> Good point. Only problem is, if someone hit enter a-million times,
> you would end up with a-million spaces where the "\n" characters were.
> To take care of that repetition, maybe something like:
>
>
> while (strpos($textarea_text, "\n\n")) {
> .
> }
>
>
> would be one way you cou
Good point. Only problem is, if someone hit enter a-million times,
you would end up with a-million spaces where the "\n" characters were.
To take care of that repetition, maybe something like:
while (strpos($textarea_text, "\n\n")) {
.
}
would be one way you could do it.
On 6/13/05
> Use the PHP str_replace function before writing it to the DB. Replace
> all "\n" characters with an empty string "".
>
> http://us2.php.net/manual/en/function.str-replace.php
I think it might be better to replace all "\n" characters with spaces " ",
otherwise you will end up with sentences tha
Use the PHP str_replace function before writing it to the DB. Replace
all "\n" characters with an empty string "".
http://us2.php.net/manual/en/function.str-replace.php
On 6/13/05, Paul Nowosielski <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm having a perplexing problem. I'm gather data through a
7 matches
Mail list logo