Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

foreach statement is giving syntax error

$
0
0
<?php foreach ($records as $rows);?>
      <?php echo $rows->firstname; ?>
<?php endforeach; ?>
                    When I put the above code in view i'm getting syntax error in the last line.  But syntax looks to be fine.  Anyone can help me why i'm  getting Severity: Parsing Error

Message: syntax error, unexpected 'endforeach' (T_ENDFOREACH)

Filename: views/site_view.php

Viewing all articles
Browse latest Browse all 14346

Trending Articles