Loop image in controller - development

Loop image in controller

MY CODE IN CONTROLLER :

 public function image_item_name($inc) 
{
    if(isset($_POST['inc'])) {
        $inc = $_POST['inc'];
        $i = DB::select("SELECT file_name FROM tbl_image_item_name WHERE inc = '$inc';");

        foreach ($i as $a){ 

          echo '<img src="../../">';

        }
    }else {
        echo "Access Denied";
    }

The Problem :
I cannot to loop the image from database, please help me.



from Laravel Questions and Answers https://laravelquestions.com/laravel/loop-image-in-controller/
via Lzo Media

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-include of inline SVG does not display gradient except in Chrome