Jump to content

[SOLVED] Validate variable - remove spaces


daveh33

Recommended Posts

I have a variable called $name - how can I validate this variable so if there is any spaces, it replaces it with a +

 

for example - if the value is John Smith, its new value would be John+Smith

                  if the value is John, its value would remain the same, John.

 

Please let me know if this is possible and how I can do it.

 

 

Link to comment
https://forums.phpfreaks.com/topic/78255-solved-validate-variable-remove-spaces/
Share on other sites

Archived

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

×
×
  • Create New...

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.