echo array of images using codeigniter and mysql
You can try with explode, like this :
$images = explode(',',$your query);<?php foreach ($images as $key => $geth) { ?><td><img src="<?php echo base_url()."uploads/hotels/".$geth;?>" width="73" height="53"></td><?php } ?>
Hope this can help you
You can try the following method:
<?phpforeach($get_hotels as $geth): $images = explode(',', $geth->hotel_images); foreach($images as $image): ?><td> <img src="<?= base_url() . "uploads/hotels/$image"; ?>" width="73" height="53"></td> <?php endforeach; ?><?phpendforeach; ?>
This uses explode to separate the values by comma and then, runs a loop over them and prints the image tags.