How can I strip / remove all spaces of a string in PHP?

I have a string like $string = "this is my string";

The output should be "thisismystring"

How can I do that?

4 s
4

Leave a Reply

Your email address will not be published. Required fields are marked *