Mega Code Archive

 
Categories / Php / Strings
 

Splitting a String Based on a Found String

<html> <head> <title>preg_split</title> </head> <body> <?php      $date = "10/10.95";          /* Allowed date delimiters are . / - */      $date_array = preg_split("/[.\-\/]/", $date);          var_dump($date_array); ?> </body> </html>