programming-examples/php/String/PHP script to remove a part of a string from the beginning..php
2019-11-15 12:59:38 +01:00

9 lines
187 B
PHP

<?php
$sub_string = 'rayy@';
$str = 'rayy@example.com';
if (substr($str, 0, strlen($sub_string)) == $sub_string)
{
$str = substr($str, strlen($sub_string));
}
echo $str."\n";
?>