PHP Strings Question

K

Karl Core

yeah, I know this is the wrong NG. I just love you guys too much.

I have a field that is a title field, that I'm converting to ucwords()
The problem is that if the user enters quotation marks, as in ' "Title Goes
Here" ' then ucwords() prints it as "title Goes Here"

Anyone know of any quick fix for this? I suppose I could strip the quotation
marks and put them back in.
 
K

Karl Core

Karl Core said:
yeah, I know this is the wrong NG. I just love you guys too much.

I have a field that is a title field, that I'm converting to ucwords()
The problem is that if the user enters quotation marks, as in ' "Title
Goes Here" ' then ucwords() prints it as "title Goes Here"

Anyone know of any quick fix for this? I suppose I could strip the
quotation marks and put them back in.

Apologies to the group for not doing a quick Google first.
Found my answer on the php.net site.

You're now free to go back to arguing with Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top