codeigniter is most valuable framework of PHP. Here you want to display image while you are fetch data from MySQL using codeigniter.
1) First you need to define a img tag. Like: <img src=””>
2) Now set a folder path in a variable. Like <?php $img_path=”assets/images/”; ?>
3) Scince you are using Codeigniter Framework then you need to set base_url() in your image path. like
<?php $img_path=base_url()."assets/images/"; ?>
4) For display imag set image path in the image src and put image value which image value you get from the MySQL. For example:
<img src="<?php echo $img_path.''.$val->user_image; ?>">
5) You can set image path directly in the image src. For example:
<img src="<?php echo base_url(); ?>assets/images/<?php echo $val->user_image; ?>">
6) If you want to set image fix width and height, then follow this code:
<img src="<?php echo base_url(); ?>assets/images/<?php echo $val->user_image; ?>" style="width: 80px; height: 80px;">
Hope it will be helpful for you.
If you need to more Codeigniter Tutorial help, you need to visit here: Codeigniter Tutorial.