[PHP] String formatting

2004-08-06 Thread Jed R. Brubaker
Hey all! Glad you are here. I have a question that is confusing me a bit. I am trying to output a string that is pulled from a database that I don't have control over. Everything is great, except that the string needs to be all on one line with no line breaks (for Javascript's sake). Is there a

Re: [PHP] String formatting

2004-08-06 Thread Jason Davidson
you could remove all br tags, \n \r chars from the string. use $string = str_replace(array('\r','\n','br'), '', $string); or something similar Jason Jed R. Brubaker [EMAIL PROTECTED] wrote: Hey all! Glad you are here. I have a question that is confusing me a bit. I am trying to output a

Re: [PHP] String formatting

2004-08-06 Thread raditha dissanayake
Jed R. Brubaker wrote: Hey all! Glad you are here. I have a question that is confusing me a bit. I am trying to output a string that is pulled from a database that I don't have control over. Everything is great, except that the string needs to be all on one line with no line breaks (for

Re: [PHP] String formatting

2004-08-06 Thread Robert Cummings
On Fri, 2004-08-06 at 13:24, Jed R. Brubaker wrote: Hey all! Glad you are here. I have a question that is confusing me a bit. I am trying to output a string that is pulled from a database that I don't have control over. Everything is great, except that the string needs to be all on one

Re: [PHP] String formatting

2004-08-06 Thread Jason Davidson
you could use css too now that i think of it.. wrap your stirng in some div tag or somehting and use white-space: nowrap; or something like that. Jason [EMAIL PROTECTED] wrote: Jed R. Brubaker wrote: Hey all! Glad you are here. I have a question that is confusing me a bit. I am trying

[PHP] String formatting function - First char Upper, rest lower

2003-09-06 Thread James Johnson
Hi, Newbie question. Does anyone know of a function or script that will capitalize the first char and lowercase the remaining chars of each word in a string? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] STRING FORMATTING QUESTION

2003-07-17 Thread Curt Zirzow
Dale Hersh [EMAIL PROTECTED] wrote: My question is regarding strings in php. I have this form in which the user fills in a description. The problem is that if the user uses any aprostrophe's or any other unusual characters in the form, the string can not be inserted into my ms sql database.

[PHP] STRING FORMATTING QUESTION

2003-07-16 Thread Dale Hersh
My question is regarding strings in php. I have this form in which the user fills in a description. The problem is that if the user uses any aprostrophe's or any other unusual characters in the form, the string can not be inserted into my ms sql database. Any ideas? Thanks, Dale -- PHP

[PHP] string formatting help

2001-07-06 Thread Chad Day
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: kjdsakjadkbrskjdksbrbrkjkdfjdfkjfd When I pull it out, it becomes: kjdsakjadk br skjdks br br kjkdfjdfkjfd