How would i make a variable become multiple variables?
like say:
i input twirp@twirp.net
and want it to say:
hello twirp of twirp.net
My book said there's away but it didn't say how...
Seperating A Variable Into Multiple Variables
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
<?php
$email = "twirp@twirp.net";
$email = explode("@",$email);
echo "Hello $email[0] of $email[1]";
?>