Guest_imported
New member
- Jan 1, 1970
- 0
i'm trying to make a chat room script it's almost done but right now i'm making some irc commands. how can i make it so thhat if someone types /me blah then it will display something else?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
//Example 1
// replace ALL instances of "/me"
$message = preg_replace("/\/me/", $user_name, $message);
//Example 2
// replace only instances at the beginning of the string
$message = preg_replace("/^\/me/", $user_name, $message);
//Example 3
// replace case variations, i.e. "/Me", "/ME", & "/mE"
$message = preg_replace("/^\/me/i", $user_name, $message);
$user_name
"[".$Time."] ".$Username