I'm currently following this basic Codeigniter tutorial and the author used this similar code in this view/post_index.php page
if (!isset($posts)){ ?>
<p> No Post to display </p>
<?php
} else {
foreach ($posts as $row){
?>
<h2> <?=$row['title']?> </h2>
<p> <?=$row['post'] ?></p>
<?php
}
}
?>
and I get an empty page with this
<h2> <?=$row['title']?> </h2>
<p> <?=$row['post'] ?></p>
in my source.
However when I use this
<h2> <?php echo $row['title']?> </h2>
<p> <?php echo $row['post'] ?></p>
I'm fine. It shows all my posts. I'm running off wamp (just downloaded the 64bits & Apache 2.4, 2.2E Version off the website, except I don't see much difference with all the other 4 packages they have....) with
Apache Version : 2.2.21
PHP Version : 5.3.10
What is going on?
Thank you.