PHP Explode
<?php
// Defining a variable containing some names of my friends (in no particular order)
$friends = 'david matt kieran jon nick andy richard';
// Lets explode 3 friends at the space saving the result (an array) as $exploded_friends
$exploded_friends = explode(' ', $friends, 3);
// This time display the entire array
echo '<pre>'; // This is just to make it look nice
print_r($exploded_friends);
echo '</pre>';
?>

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home