I'm new to processwire and have just started playing around with it for the past week. At the moment, I'm trying to use repeater fields and am having difficulty getting them to output to my page. Instead, what bizarrely seems to be happening is that half of the foreach loop declaration seems to be appearing as plain text on my page and is commented out when I check inspect element.
I'm not sure if my syntax is wrong or this is an entirely different problem. Any help would be hugely appreciated!
Here's my code:
<? foreach ($portfolio->portfoliopreviews as $portfoliopreview): ?>
<img class="pic" src="<?=$portfoliopreview->portimg->url;?>"/>
<button class="portbtn">Read More</button>
<? endforeach; ?>
And in the attached images you can see what's happening on the page and within inspect element.
You can see that the div is being created, albeit without any fields populating inside of it. You can also see that loop is being commented out within inspect element.