I find myself frequently repeating HTML code to format items such as lists, tables, and other areas that have the save format repeated (ie: staff photos). I know there has to be some way to simplify HTML output for sections that use repeated formatting, but I’m not sure if an Array is applicable or if there’s a better way that I haven’t quite discovered.
As an example, I recently developed a store listing directory for the Macon Mall. This is one section of code:
<ul>
<li>Belk<br /><span class="both">Upper & Lower Level</span><br />(478) 477-2355</li>
<li>JCPenney<br /><span class="both">Upper & Lower Level</span><br />(478) 477-8400</li>
<li>Macy's<br /><span class="both">Upper & Lower Level</span><br />(478) 471-3847</li>
<li>Sears<br /><span class="both">Upper & Lower Level</span><br />(478) 471-5555</li>
</ul>
How could I simplify the process of inputting this by utilizing the power of PHP?
I hope I’ve made myself clear. Feel free to ask questions if not. Thanks for the help, all!
1 Answer