Posted By

roflman79 on 06/11/09


Tagged

php strsplit


Versions (?)

str_split in PHP4


 / Published in: PHP
 

URL: http://kl93.blogspot.com/2007/07/emulate-php5-strsplit-in-php4.html

Taken from Doug Sparling's Blog

  1. function str_split($str) {
  2. $str_array=array();
  3. $len=strlen($str);
  4. for($i=0; $i<$len; $i++) {
  5. $str_array[]=$str{$i};
  6. }
  7. return $str_array;
  8. }

Report this snippet  

You need to login to post a comment.