0

Getting this error on my code and I'm not quite sure what the problem here is. basically i wanted my markup to print 3 columns of the data from the query on one row then when that's completed i wanted to break a line and print a new row of 3 columns until the end of the data. this is what i got

    <div class="row">
<?php while($data): ?>
    <?int $i = 0;
    while($i < 3){ ?>
        <div class="column">
            <h1><?php print $data['f.name']; ?></h1>
            <p>serving</p>
            <p><?php print $data['p.grams']; ?>G = <?php print $data['p.percentage']; ?>%</p>
        </div>
        $i++;
    <?}?>
        <br/>
<?php endWhile; ?>

it's saying there's an unexpected $i but i can't see what's causing the issue.

chris85
  • 23,846
  • 7
  • 34
  • 51

0 Answers0