Ejemplo n.º 1
0
            <table class="table table-striped">
               <thead>
                 <tr>
                 <th>Название</th>
                 ';
 foreach ($chars as $key => $value) {
     echo '<th>' . $value['char_name'] . '</th>';
 }
 echo '<th>Стоимость</th>';
 echo '
                 </tr>
               </thead>
               <tbody>
               ';
 foreach ($data as $key => $value) {
     $url = $functions->current_url() . '/' . strtolower($functions->translit($value['name'])) . '-' . $value['id'];
     echo '<tr>';
     echo '<td><a href="' . $url . '">' . $value['name'] . '</a></td>';
     foreach ($value['chars'] as $key1 => $value1) {
         if ($value1['value'] == 'none') {
             continue;
         }
         echo '<td>' . ($value1['value'] == 'none' ? 'Не указано' : $value1['value']) . '</td>';
     }
     echo $value['price'] == 0 ? '<td><b>По запросу</b></td>' : '<td>' . $value['price'] . '</td>';
     echo '</tr>';
 }
 echo '
               </tbody>
             </table>
            ';