while ($row = $checkUser->fetch_assoc()) {
        $arr = $row['username'];
}
check like this just don't work
if($arr !="john"){
}else{
}
how can I check $row['username'] contain or not string "john"?
while ($row = $checkUser->fetch_assoc()) {
        $arr = $row['username'];
}
check like this just don't work
if($arr !="john"){
}else{
}
how can I check $row['username'] contain or not string "john"?
 
    
    presumming that you are getting this $row['username'] right. then
$arr = array();
while ($row = $checkUser->fetch_assoc()) {
        $arr[] = $row['username'];
}
if(in_array("john",$arr)){
    //there is a username john in the array
}else{
    //this is no john inside the array
}     
