Without a great knowledge of regexp I'd do it this way:
PHP Code:
// Input string ($_REQUEST['msg'] in your case)
$str = 'echo Hello';
// Get the first 4 characters of the string
$sub = substr($str, 0, 4);
// If it matches then echo out the latter part of the string
if($sub == 'echo')
echo substr($str, 4);
// Echoes "Hello"
Probably better using regexp, this will work as long as your just using "echo". If you need it to do different things depending on what the user types, like special keywords, then please mention it.
Bookmarks