Jump to content

Archived

This topic is now archived and is closed to further replies.

Relaxer

simple question

Recommended Posts

hi, im making a simple form. the data is inputed to the database using mysql. My problem here when i inputted two words. the data in the db has space between words. is there a script or code that will automatically input underscore on this two words? is there a possiblity?

Share this post


Link to post
Share on other sites

so u are trying to replace the blank space with \"_\" is that so?

 

now u can use str_pos and find out the position of the blank space occurance and

 

use str_replace to replace the blank pace with \"_\".

Share this post


Link to post
Share on other sites

You would not need to use strpos().. like shiva said, use str_replace()

Share this post


Link to post
Share on other sites

Thanks to you guys, the script is now runnin smooth.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.