OK here is the issue I have more than one product which needs a note displayed. What would be the best way to echo the note to more than one product without writing the whole of the below code out for each product?
<?php if ($data['header']['group_code'] == 'R088X') { ?>
<li><span>Printers:</span> Wipe the allocated print area before print application with methylated spirit.</li>
<?php } ?>
I have tried the following put it doesn’t work…
<?php
$data = array((['header']['group_code'] == 'R088X', 'R129X'));
if (in_array(['header']['category'] == 'R088X', $data)) { ?>
<li><span>Printers:</span> Wipe the allocated print area before print application with methylated spirit.</li>
<?php } ?>
Any suggestions would be grateful:)
PHP is not the nicest programming language to write in when it comes to arrays!
If you are running PHP 5.4, however, you can write this: