Mega Code Archive

 
Categories / Php / Data Type
 

Using the explode() Function

<?php     $input_string = "this is a test.";     $pieces = explode(",", $input_string);     echo "Names in List: <BR/>\n";     foreach($pieces as $name) {         echo trim($name) . "<BR/>\n";     } ?>