If I have a .phtml file (php and html) and want to be able to lint that file checking for both html and php errors… how would I go about doing that?
eg. the file is called “index.phtml”
and contains the following:
<?php $_products=$this->getLoadedProduct(); ?> <?php if(!$getLoadedProduct->count()): ?> <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p> <?php else: ?> <div class="category-products"> <?php echo $this->getHtml('product_list.before_toolbar'); ?> <?php echo $this->getToolbarHtml() ?> <ol class="row products-grid" id="products-grid"> <?php $i=0; foreach ($_products as $_product): $i++; ?> <li class="col-lg-6 col-md-6 col-sm-6 col-xs-12 item"> <?php echo $this->getGridItemHtml($_product); ?> </li> <?php endforeach ?> </ol> </div> <?php endif; ?>
As you can see it contains both php and html code… would like to lint both