/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* Function: eexplode Explodes an string and removes any empty elements in the resulting array Parameters: $separator - The separator used to explode the $string $string - The string to explode Returns: An array with no empty elements Example: print_r(explode(":","evan:walsh:")); Array( [0] => evan [1] => walsh [2] => ); print_r(eexplode(":","evan:walsh:")); Array( [0] => evan [1] => walsh ); */ function eexplode($separator,$string){ foreach($array as $key => $val){ } } return $array; }
URL: http://nothingconcept.com