i am trying to write a program in php that looks for "au" letter combinations within a string, if found, it should echo "1" if not echo "2". My problem is on my if condition. Any ideas?
<?php
$word = "csa";
$b = str_split($word);
$length = count($word);
for ($i = 0; $i< $length; $i++) {
if ($b[$i] = "a" & $b[$i+1] = "u")
echo "1";
else
echo "2";
}
?>