thanks for the reply! I've tried out the code and modified it slightly, but I'm still getting errors:
<?
$input = "this is my string";
$lettersArray = array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "@", ".", ":", "_", "-");
//
//
$chars = preg_split('//', $input, -1, PREG_SPLIT_NO_EMPTY);
//
//
$output = array();
for ($i = 0; $i<=sizeof($chars); $i++) {
for ($j = 0; j <= sizeof($lettersArray); $j++) {
if ($chars[$i] == $lettersArray[$j]) {
array_push ($output, $j);
}
}
}
//
//
print sizeof($output);
?>
there must be something blindingly obvious wrong here, but it's late and I can't see it. Why won't var j get pushed into array "output"? cheers again...