replace spaces with _ in php -


I am trying to change the spaces in the following var

  $ e_type = 'Hello world test';  

Please me

You want:

  $ e_type = str_replace ('', '_', $ e_type);  

Comments