I’ve been trying to figure this out as I’ve never needed to do this before, but how would I remove 2 parts of the string? This is what I have so far..
str_replace('/pm ', '', $usrmsg)
$usrmsg would be what the user sent in my chat room, I’ve already removed /pm but this needs 2 variables…
1: The username
2: The message to the user
Usernames don’t have spaces, therefore after the 2nd word, the message to the user will be inputted. How can I remove the first 2 parts of the string separately?
or simply