Jan 6, 2003 #1 kpdvx Programmer Dec 1, 2001 87 US $name = 'johnoliver' Ok, I know that $firstname = 'john'. How can I pull the last name (which is oliver) from $firstname and assign it to $lastname ?
$name = 'johnoliver' Ok, I know that $firstname = 'john'. How can I pull the last name (which is oliver) from $firstname and assign it to $lastname ?
Jan 7, 2003 #2 BB101 Programmer May 23, 2001 337 GB preg_match("/^".preg_quote($firstname)."(.*)$/", $name, $m); $m now contains an array, element number 1 has the surname --BB Upvote 0 Downvote
preg_match("/^".preg_quote($firstname)."(.*)$/", $name, $m); $m now contains an array, element number 1 has the surname --BB