I am new to php and want to create a simple gallery using an extensive file and implementing it in the index.php: I create an array and use a foreach loop to add pictures with some additional info. Something is obviously wrong with the logic or/and the syntax : ( All I get so far is a blank red rectangle.
<?php>
$landscape = array(
'pic1'=> array('name'=>'picture1.jpg','label'=>'p1', 'text'=>''),
'pic2'=> array('name'=>'picture2.jpg','label'=>'p2', 'text'=>''),
'pic3'=> array('name'=>'picture3.jpg','label'=>'p3', 'text'=>''),
'pic4'=> array('name'=>'picture4.jpg','label'=>'p4', 'text'=>''),
);
$galleriya='';
foreach ($landscape as $key => $value) {
$galleriya .= "<div>
<div style='float:left;height:140px;width:200px;border:1px solid red;'>
<img src=$value['name'] alt=''>
</div>"
."<div style='font-size:50px;'>$value['label']</div>"
."<div style='font-size:50px;'>$value['text']</div>
</div>"
};
echo($galleriya);
?>