Crazy stuff — @Joseinnewworld wasn’t satisfied with 58 #NFTs, so he went ahead and added 9 more 😳🔥
— NFToa (@nftoa_) August 19, 2025
This level of dedication is just unreal. Huge thanks, legend 🙌 #NFTCollectors #NFT #NFTCollection #NFTartist #CryptoRecovery #eCash $XEC #blockchaindaily pic.twitter.com/mpYjYLDkpP
I want to replace all spaces in a url with %20. How do I do that with regex?
Thank You!
Solutip
No need for regex here, if you just want to replace a string with another: using str_replace() should be more than enough:
$new = str_replace(' ', '%20', $your_string);However, if you want more than that, and you probably do, if you're working with URLs, you should take a look at urlencode() the functionality.
