Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1.  
  2.         foreach ($data['category'] as $index => $module_category)
  3.         {
  4.             if (!empty($module_category['image']))
  5.             {
  6.                 foreach ($module_category['image'] as $index_2 => $image)
  7.                 {
  8.                     $data['category'][$index]['image'][$index_2] = array(
  9.                         'image' => $image,
  10.                         'thumb' => $this->model_tool_image->resize($image, 100, 100)
  11.                     );
  12.                 }
  13.                 // Rozdelit pole na ctvrtiny a ty vypsat v sablone
  14.                 $img_len = count($module_category['image']);
  15.                 $divider = round($img_len / 4);
  16.                 $chunk = array_chunk($module_category['image'], $divider);
  17.             }
  18.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement