note 80929 modified in function.str-split by danbrown

From: Date: Mon, 04 Aug 2008 15:34:27 +0000
Subject: note 80929 modified in function.str-split by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143138@lists.php.net to get a copy of this message
Syntax corrected version:- <?php if(! function_exists('str_split')) { function str_split($text, $split = 1) { $array = array(); for ($i = 0; $i < strlen($text); $i += $split) { $array[] = substr($text, $i, $split); } return $array; } } ?> --was-- Syntax corrected version:- if(! function_exists('str_split')) { function str_split($text, $split = 1) { $array = array(); for ($i = 0; $i < strlen($text); $i += $split) { $array[] = substr($text, $i, $split); } return $array; } } http://php.net/manual/en/function.str-split.php

« previous php.notes (#143138) next »