Split name - Php

Split name

Snippet Code


  
Rate this page :
  [ 0 votes]

Split the name

<?php $name = "John S Smith"; list($fname, $lname) = split(' ', $name,2); echo "First Name: $fname, Last Name: $lname"; ?>

Tags


Ask Questions

Ask Question