mercredi 13 novembre 2019

PHP IF statement containing || from an array

I'm trying to write an IF statement to show a button on certain pages but it doesn't work and I'm not sure why -

            <?php if($services['name'] == 'ISBN' || 'Fulfilment' || 'Author Arena' || 'Legal Deposit and Library Registration') { ?>
            <a href="<?php echo $services['why-us']['button']['link']; ?>" class="btn btn--reverse"<?php echo $services['why-us']['button']['type'] == 'download' ? ' target="_blank" download' : ''; ?>>
                <?php echo $services['why-us']['button']['name']; ?>
            </a>
            <?php } ?>

Aucun commentaire:

Enregistrer un commentaire