私は次のPHP配列構造を持っています:
$set = array();
$set[] = array('firstname'=>'firstname 1',
'lastname'=>'lastname 1',
"bio"=>array('paragraph 1 of the bio, 'paragraph 2 of the bio','paragraph 3 of the bio'),
);
次に、次の方法で配列にアクセスします。
<?php $counter = 0;
while ($counter < 1) : //1 for now
$item = $set[$counter]?>
<h1><?php echo $item['firstname'] ?></h1>
<h1><?php echo $item['lastname'] ?></h1>
<?php endwhile; ?>
配列の「bio」部分をループして各段落をエコーする方法がわかりません。
したがって、最終的な出力として、2つのh1(名前と姓)と3つの段落(略歴)が必要です。
どうすればこれを行うことができますか?