[Solved] Mixing PHP and HTML code [closed]
[ad_1] I am assuming you want the html code here block to only display if the first if test is TRUE. If that is the case, move the trailing } before the html block to after. <?php foreach ($myResults as $rowNumber => $myResult) { if ($rowNumber<$numberOfResults/2) { print “<h2>”; print render($myResult->field_field_item_category[0][‘rendered’][‘#title’]) ; print “</h2>”; ?> … Read more