labcoatmedia

Untitled

Mar 1st, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1.         foreach($images as $image) {
  2.             $theimage = wp_get_attachment_image_src($image->ID,$size);
  3.             $lastone = next($images)==FALSE;
  4.             $attimg    = '{image : \'';
  5.             $attimg   .= $theimage[0];
  6.             $attimg   .= '\'}';
  7.             if(!$lastone){
  8.                 $attimg .= ',';
  9.             }
  10.             echo $attimg;
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment