I'm struggling with making an if statement where if a variable value (the page title) equals 'loan' a field is div is hidden but if the variable equals any other value the div is displayed.
<?php
if(!empty($product['custom_fields'][1]['value'])){ ?>
<div class="content-2">
<p><strong><?= $product['custom_fields'][1]['field']?></strong>
<br /><?= $product['custom_fields'][1]['value']?></p>
</div>
<?php }
?>
I have created the following code to show the hidden div (on on the 'loan' pages) but can't seem to successfully incorporate that code into the if statement for the custom field variables above.
<?php
if(false !== stripos ($product_list_data['name'], 'loan')){
echo "<div class='content-bottom'><p><strong>" . $product['custom_fields'][1]['field'] . "</strong>
<br />" . $product['custom_fields'][1]['value'] . "</p></div>";
}
?>
Any help would be greatly appreciated.