I'm attempting to use CodeIgniter to create a website, but PHP is giving me trouble. I'm confident that it is so obvious and cannot be flawed. But I'm new to CodeIgniter and have no idea where issues come from.
    <html>  
    <head>  
        <title><?=$page_title?></title>  
    </head>  
    <body>  
        <?php foreach($result as $row):?>  
        <h3><? echo $row->title; ?></h3>  
        <p><? echo $row->text; ?></p>  
        <?php endforeach;?>  
    </body>  
</html> 
I've a bug from this file :
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: views/helloworld_view.php
Line Number: 6
Can someone please help me with this?