I\'ve written what I thought was a very simple use of the php explode() function to split a name into forename and surname:
explode()
// split name into f
Presumably, whatever $fullname is doesn't contain a space, so $split is an array containing a single element, so $split[1] refers to an undefined offset.
$fullname
$split
$split[1]