I want to loop every value of an array and check if it exists in another array and IF SO, delete that value from second array. And only first letter(iteration) is looped. Letter T is deleted from an array and stops looping. Please explain.
<?php
function detect_pangram($string) {
$alphas = range('A', 'Z');
$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string);
$string = trim($string, ' ');
$array = str_split($string);
foreach($array as $value){
if(in_array($value, $alphas))
{
unset($alphas[array_search($value, $alphas)]);
continue;
}
}
var_dump($alphas);
}
detect_pangram("The quick brown fox jumps over the lazy dog.");
?>
Tis the only uppercase letter.