Created
June 1, 2015 11:46
-
-
Save terryupton/e86ad289dd96f1bc8234 to your computer and use it in GitHub Desktop.
PHP Associative Array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="section // section--base // section--fixed"> | |
<div class="container"> | |
<?php | |
//Array (Feature Title, Feature Description, Icon Class); | |
$adverts = array ( | |
array('No Call Out Charge','Free quotation for all jobs','no-callout'), | |
array('Qualified Plumbers','Qualified Gas Safe Engineers','tick'), | |
array('Free Quotations','No obligation free quotations','contract'), | |
array('Great Service','Knowledgeable, experienced staff','thumb'), | |
array('5 Star Reviews','We are trustworthy and reliable','star'), | |
array('No Call Center','Speak with our experienced staff','no-call-center'), | |
); | |
// $random = rand(0, 5); | |
for ($row = 0; $row < 2; $row++) { | |
echo '<div class="feature-half">'; | |
echo '<svg class="icon icon-feature" aria-labelledby="title-icon-'.$adverts[$row][2].'" aria-describedby="desc-icon-'.$adverts[$row][2].'"><use xlink:href="/assets/img/icons.svg#icon-'.$adverts[$row][2].'"></use></svg>'; | |
echo '<h2 class="feature-half__title">'.$adverts[$row][0].'</h2>'; | |
echo '<p class="feature-half__text">'.$adverts[$row][1].'…</p>'; | |
echo '</div>'; | |
} | |
?> | |
<div class="feature-half__cta"> | |
<?php include($_SERVER['DOCUMENT_ROOT'].'/includes/module.tel.php'); ?> | |
</div> | |
</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment