<?php $str1 = 'texc'; $str2 = 'texc'; $ch_check = []; for($i = 0; $i <strlen($str1); $i++){ $ch = $str1[$i]; for($j = 0; $j <strlen($str2); $j++){ if($ch == $str2[$j]){ $ch_check[] = $ch; } } } //echo "<pre>"; //var_dump($ch_check); //echo "</pre>"; if(count($ch_check) == strlen($str1)){ echo "Bingo!"; }else{ echo "Nope :("; }
You have javascript disabled. You will not be able to edit any code.