Advertisement
Guest User

sortowanie

a guest
Jul 19th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. function arraytoitem($array, $imgn, $img){
  2.  
  3.     foreach ($array as $item){
  4.         $url=explode("/", $item);
  5.         $numofarr=count($url)-1;
  6.         if ($numofarr==0){
  7.             echo '<img src="'. plugins_url( $imgn, __FILE__ ).'" />';
  8.         }else{
  9.             echo '<a href="'.$item.'" title="'.$url[$numofarr].'" ><img src="'. plugins_url( $img, __FILE__ ).'" /></a> ';
  10.         }
  11.        
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement