.
Divya
The substr() function is used to returns a part of a string in PHP.
substr(string,start,length)
In this example John is the first name and Deo is the last name and we show you only the first name.
<!DOCTYPE html>
<html>
<body>
<?php
$name=substr("John Deo",5);
echo $name;
?>
</body>
</html>
.