Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Splitting a String Based on a Found String

Sun Oct 26, 2008 9:53 pm

Code:
<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>




Post a reply
  Related Posts  to : Splitting a String Based on a Found String
 Replacing a Pattern with a Found String     -  
 Takes a string apart based on a delimiter     -  
 check if string start with a specific sub-string in PHP     -  
 recursive string reversal- reverse string     -  
 check if string ends with specific sub-string in php     -  
 String token for string split     -  
 Pad a string to a certain length with another string     -  
 get string size in c++     -  
 get number from string     -  
 find a string     -  

Topic Tags

PHP Strings