im displaying list of results through for each array where i need to hide a button for only specific items in list , i tried it using an if statement , but its hiding button of whole list items , please advice me on this?
here the place i have put code. this will hide whole buttons even though the id is not equal to 83
<div class="jd-items-button-details">
<?php if(($item->categories_id)==83) { ?>
<style type="text/css">
.jd-button-details {display:none !important}
</style>
<?php
} else {
echo "test2";
}
echo $item->categories_id;
?>
<?= JHTML::_('link', $link , JText::_('COM_JOMDIRECTORY_DETAILS'), 'class="jd-button-details"') ?>