$message = "text text [playerinfo]Neomaster[/playerinfo] text etc...";
$string = ('/\[playerinfo\](.*)\[\/playerinfo\]/');
$usercheck = preg_replace($string,"$1",$message);
$username = $usercheck;
How can I change this to make $username = Neomaster?
I need to check the message to see if someone use [playerinfo] [/playerinfo] , Then I need to put what is in the middle of [playerinfo] [/playerinfo] in a variable named $username.
The problem of the above code is that it returns the whole message , not only the username...
$string = ('/\[playerinfo\](.*)\[\/playerinfo\]/');
$usercheck = preg_replace($string,"$1",$message);
$username = $usercheck;
How can I change this to make $username = Neomaster?
I need to check the message to see if someone use [playerinfo] [/playerinfo] , Then I need to put what is in the middle of [playerinfo] [/playerinfo] in a variable named $username.
The problem of the above code is that it returns the whole message , not only the username...