note 12713 deleted from function.substr by jimw

From: Date: Thu, 20 Dec 2001 23:01:27 +0000
Subject: note 12713 deleted from function.substr by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23525@lists.php.net to get a copy of this message
This function turns a normal string into an array (Much like thechar[20] in C or split(//, $string) in perl) .. function strarray($in_string) { if (!($in_string)) { return 0; } for ($i = 0; $i <= (strlen($in_string) - 1); $i++) { $current_char = substr($in_string, $i, 1); $string_array[$i] = $current_char; } return $string_array; }

« previous php.notes (#23525) next »