on-internet
← Community

How do I strip all spaces out of a string in PHP? [duplicate]

Stack Overflow ·

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?

Comments

Sign in or sign up to comment and upvote.

No comments yet.