php:提供的参数无效

<?php 
    $student_info = getAllRows('student');
    $counter = 1;
    foreach ($student_info as $key => $student) {
?>
<tr>
    <td><?php echo $student['email']; ?></td>
    <td>
    <?php 
        if (isset($student['image']) && !empty($student['image']) && file_exists(UPLOAD_DIR.'student/'.$student['image'])) {
            echo "<img src='upload/student/".$student_info['image']."' class='img img-responsive img-thumbnail' width='300px'> ";
        }else{
            echo "<img src='upload/logo.png' class='img img-responsive img-thumbnail' width='300px'> ";
        }
    ?>
    </td>
    <td><a href="addaccount.php?id=<?php echo $student['id'] ?>&amp;act=edit">edit</a>/<a href="account.php?id=<?php echo $student['id'] ?>&amp;act=delete" onclick="return confirm('Are You sure you want to delete this student Account?');">delete</a>/<a href="change_password.php?id=<?php echo $student['id'] ?>&amp;act=change_password">Change Password</a></td>
</tr>

I have use this code... but showing some error

error:

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\school\admin\view_student_profile.php on line 58

I want to get data from db... and then show all the photo... there is more than one data in db... and also there is file in the source folder... my problem is that i wanna show related photo if present else a website logo

Why not just wrap your foreach($student_info) with a !empty($student_info) checking before doing any further looping with $student_infoarray ?

if(!empty(student_info)){
    foreach ($student_info as $key => $student) {
     // your other code goes here 
    }
}