I have following code for get image from my database table field.
public function getStudentses() {
$students_data = array();
$query = $this->db->query(
"SELECT * FROM " . DB_PREFIX . "students
WHERE customer_id = '" . (int)$this->customer->getId() . "'");
foreach ($query->rows as $result) {
$students_data[$result['students_id']] = array(
'students_id' => $result['students_id'],
'firstname' => $result['firstname'],
'filename' => $result['filename'],
'image' => $result['image'],
);
}
return $students_data;
}
This is my HTML code for display image:
<img src="<?php echo $result['image']; ?>" />
but when I render my page the image is not display properly its like some symbols like
s4�.���N����萗�p�A@4pbr��]�����F�G�>�v��W
Why its like this? How can I fix my error?