PHP Tutorials: Name Splitter (Part 1)
Splits a full name into two seperate variables. Useful for signup forms where you just want to ask the user their full name, and not have two seperate boxes for first and last names.
5 Responses to “PHP Tutorials: Name Splitter (Part 1)”


if you use split(); this will be fine ..
Report this comment
The point of this was to teach people the logic of string operation. Yes, someone can use split, but then then may not be very good at programing logic.
Report this comment
True, even though I know all of this, it’s good practice to learn the language in every way.
Report this comment
hii your r sow good in php
Report this comment
$lastname value is ” ” and not “Garret”
instead
$firstname is “AlexGarret”
I don’t understand the logic..
program is wrong in the logic.
Report this comment