Skip to content

Instantly share code, notes, and snippets.

@otanodesignco
Created June 20, 2013 18:26
Show Gist options
  • Save otanodesignco/5825275 to your computer and use it in GitHub Desktop.
Save otanodesignco/5825275 to your computer and use it in GitHub Desktop.
Turn a string into a character array.
<?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