<?php
$name = "John S Smith";
list($fname, $lname) = split(' ', $name,2);
echo "First Name: $fname, Last Name: $lname";
?>
O/P:First Name: John, Last Name: S Smith
$name = "John S Smith";
list($fname, $lname) = split(' ', $name,2);
echo "First Name: $fname, Last Name: $lname";
?>
O/P:First Name: John, Last Name: S Smith
0 comments:
Post a Comment