есть 2 массива разных по длине, но мне их надо вывести в одну таблицу но в разные колонки делаю так, но выводит конечно соответственно равное по длине количество строк это если бы в первом и втором было одинаковое количество значений. Так не годится, т.к. часть массива второго не выводится на экран. По той же причине нельзя использовать это PHP: foreach (array_combine($icons, $infos) as $code => $name) { т.к. вообще вылетает ошибка... вот код который хочу доработать. PHP: $icons = explode(";", $icon); $infos = explode(";", $info); echo "<table>"; foreach( $icons as $index => $code ) { echo "<tr><td class='koni2'>" .$code . '</td><td>' . $infos[$index] . "</td></tr>"; } вот как выглядят массивы Первый вариант Код (Text): 1;2;13; и соответствующий ему массив Код (Text): The amount of lowering will be reduced on vehicles fitted with Original Sport Suspension / OEM. ;The lowering of the front axle depends on the vehicle specification and weight of the engine. ;All wheel / tyre combinations are allowed which have been approved by the ABE or othat certified Wheel Testing Institutes (Germany, Austria, Switzerland). ; ;Front: 35 mm. ;Rear: 35 mm. Второй вариант Код (Text): N;N3;2;o;f;a и соответствующий ему массив Код (Text): Top groove is standard ;bottom groove 15 mm lower ;Number of grooves ;Spring seat adjustment. The figure in the circle = number of grooves. ;Externally adjustable by means of a knob or pin without removing the shock absorbers from the car. ;Gas-charged shock absorber.
@graf_vorontsov PHP: <?php $arr1 = [1,2,3,4,5,6,7,8,9,0]; $arr2 = ['a','b','c','d']; array_map(function($a, $b) { echo "<td>$a</td><td>$b</td>\n"; }, $arr1, $arr2); результат HTML: <td>1</td><td>a</td> <td>2</td><td>b</td> <td>3</td><td>c</td> <td>4</td><td>d</td> <td>5</td><td></td> <td>6</td><td></td> <td>7</td><td></td> <td>8</td><td></td> <td>9</td><td></td> <td>0</td><td></td>