Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. if( $prod->info['desc'][3] != '' )
  2.             {
  3.                 $prod->info['desc'][3] = str_replace("\r\n", "\n", $prod->info['desc'][3]);
  4.                 $prod->info['desc'][3] = str_replace("\r", "", $prod->info['desc'][3]);
  5.                
  6.                 $temp_tech = explode("\n", $prod->info['desc'][3]);
  7.                                
  8.                 $table = '<table class="shop-tech"><tbody>';
  9.                 for( $i=0; $i<=count($temp_tech)-1; $i++)
  10.                 {
  11.                     $temp_tech2 = explode('||||', $temp_tech[$i]);
  12.                     if( $temp_tech2[1] == 0 )
  13.                         $table .= '<tr><td class="shop-tech-header" colspan="2">'. $temp_tech2[0] .'</td></tr>';
  14.                     else
  15.                         $table .= '<tr><td class="shop-tech-left">'. $temp_tech2[0] .'</td><td class="shop-tech-right">'. $temp_tech2[1] .'</td></tr>';
  16.                 }
  17.                 $table .= '</tbody></table>';
  18.                
  19.                 $module->assign('tech_notes', $table);
  20.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement