Very new to PHP Arrays and can't find out how to do a simple thing.
This is what I started out with:
<div class="crew-member">
<?php
$crewMember = "Tony Webster";
$crewMemberPicture = strtolower(str_replace(" ","-",$crewMember));
$crewTitle = "Senior Helmsman";
?>
<img src="images/crew/<?php echo $crewMemberPicture; ?>.jpg" alt="<?php echo $crewMember; ?>" />
<h4><?php echo $crewMember; ?></h4>
<h5><?php echo $crewTitle; ?></h5>
</div>
And then I was repeating that down the page. But I figured it'd be easier using an array and maybe a foreach loop of some description...
$crewMembers = array(
"Tony Webster" => array("Senior", "tony-webster"),
"John Reilly" => array("Junior", "john-reilly")
);
Is that array even going to work for me?
I then want to output these into a foreach loop (I think?) with HTML...
Not knowing much about arrays or foreach loops, I got stuck.