Advertisement
Guest User

Массив

a guest
Apr 23rd, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1.     if( !is_null($deco['creators']) )
  2.     {
  3.        
  4.         $director = array();
  5.         $actor = array();
  6.         $producer = array();
  7.         $voice_director = array();
  8.         $voice = array();
  9.         $writer = array();
  10.         $operator = array();
  11.         $composer = array();
  12.         $design = array();
  13.         $editor = array();
  14.        
  15.         foreach( $deco['creators'] as $key => $value )
  16.         {
  17.            
  18.             if( $value )
  19.             {
  20.                
  21.                 for( $i = 0, $k = 0; $i < count($value); $i++ )
  22.                 {
  23.                    
  24.                     if( !$value[$i]['name_person_ru'] && !$value[$i]['name_person_en'] )
  25.                         continue;
  26.                    
  27.                     $title_ = ( !$value[$i]['name_person_ru'] ) ? $value[$i]['name_person_en'] : $value[$i]['name_person_ru'];
  28.                    
  29.                     ${$key}[] = $title_;
  30.  
  31.                 }
  32.                
  33.             }
  34.            
  35.         }
  36.        
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement