Splitting a String Based on a Found String : String Split « String « PHP






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>
           
       








Related examples in the same category

1.preg_split (/\+{1,}/)