Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove underscore from values of textarea?

i am getting values from textare as show in double qoutes

"Hi_i_am_working_on_javascript_comment_box"

how to remove underscore value from it...

like image 594
Puneeth Punee Avatar asked May 21 '12 06:05

Puneeth Punee


2 Answers

Use str_replace() for example. Like that (see proof here):

$input = 'Hi_i_am_working_on_javascript_comment_box';

$output = str_replace('_', ' ', $input);
like image 101
Tadeck Avatar answered Sep 30 '22 04:09

Tadeck


use str_replace with php:

$string=str_replace("_"," ",$string);
like image 33
M Rostami Avatar answered Sep 30 '22 04:09

M Rostami