k42b3: Werte in Schleife ausgeben

Beitrag lesen

hi pyro,
ich wuerde dir folgenden Loesungsansatz vorschlagen:

<?php
$data = array(

array(

'link' => 'link/bild1.jpg',
  'text' => 'text1'

),

array(

'link' => 'link/bild2.jpg',
  'text' => 'text2'

)

)

echo '<table>';

foreach($data as $value)
{
 echo '<tr>';
 echo ' <td>' . $value['link'] . '</td>';
 echo ' <td>' . $value['text'] . '</td>';
 echo '</tr>';
}

echo '</table>';
?>

mfg k42b3