php - Get the string to the right of another string -
been working bit on chat/shoutbox of mine, , have row in users table called muted (0 not muted, 1 muted). want is, when type !mute <target> should update row <target> , set muted 1.
i know how check if string contains !mute, this:
if (strpos($sboxmsg,'!mute') !== false) { } the thing is, have no idea how right of !mute. , need turn right variable can use in query later on.
example:
!mute nick then store nick in variable called eg. $variable1
is possible? appreciated!
use
$variable1 = preg_replace('/^\!mute\s+/', '', $whatever_input);
Comments
Post a Comment