I am trying to convert data from selected cell in SQL table to string so I can check if it's value is NULL.
This is how my code looks now:
$columnname="cоntact";
$columnnumber=1;
$column=$columnname . $columnnumber;
$selectcell = mysqli_query($link, "SELECT '{$column}' FROM contacts WHERE id='{$userid}'");
$result = mysqli_fetch_assoc($selectcell);
$cell=(string)$result;
if (is_null($cell)) {
    // do something
} 
And this is the error I get:
Notice: Array to string conversion
I am sorry if my mistake is obvious, I am pretty new to php.
 
     
     
    