In my project I get back a name of a person through a php response. And I store that name in a variable.
So the name could be like James Smith or Sakhu Ali Khan or anything else.
I want to replace the spaces between the names with "."
Suppose I get the James Smith and I will save it in $userName
Now I want to parse $userName
and then replace the spaces with "." so my
$parsedUserName == James.Smith
Can anyone tell me how to do this in php. I am not very much familiar with text parsing.
Best Zeeshan