PHP数组让我感到震惊


I have some variables that I retrieve withem some data from the database like so:

foreach ($row as $result) {
    if ($row[28] == '') {
        $string28 = '';
    }else if( $row[28] == 0){
        $string28 = '';
    } else{
        $string28 = '<div class="add_img"><h1>Connexion</h1><img src="images/'.$row[28].'.jpeg"></div>';
    }
}


foreach ($row as $result) {
    if ($row[30] == '') {
        $string30 = '';
    }else if($row[30] == 0){
        $string30 = '';
    } else{
        $string30 = '<div class="add_img"><h1>Fixation</h1><img src="images/'.$row[30].'.jpeg"></div>';
    }
}

foreach ($row as $result) {
    if ($row[31] == '') {
        $string31 = '';
    }else if($row[31] == 0){
        $string31 = '';
    } else{
        $string31 = '<div class="add_img"><h1>Schéma</h1><img src="images/'.$row[31].'.jpeg"></div>';
    }
}

and here's the show results code:

<h1>Application</h1>
<div class="clear"></div>
<div class="add_div">
<?php
echo $string28;
echo $string29;
echo $string30;
echo $string31;
echo $string34;

?>

But I can't code this expression with php
First I want to store all the variables in an array an then say if the array is empty here we are talking about if all te variables are empty then echo the espression There's nothing

Hope you can Help Me Guys.
And thanks to all of you in advance.

Your question is a bit confusing, but to tell if a variable is empty, just use empty()

if(empty($string28)) {
   // do something since it's empty
}

It will work on arrays as well ...

$array = array();
if(empty($array)) {
   echo "Yep, it's empty!";
}