Created
June 20, 2013 18:26
-
-
Save otanodesignco/5825275 to your computer and use it in GitHub Desktop.
Turn a string into a character array.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function strToCharArray($text) | |
{ | |
$txtLen = strlen($text); | |
$charArray; | |
for($i = 0; $i < $txtLen; $i++) | |
{ | |
$charArray[$i] = $text{$i}; | |
} | |
return $charArray; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment