str_split in PHP4


/ Published in: PHP
Save to your folder(s)

Taken from Doug Sparling's Blog


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.