-1
<?php 
    foreach ($blogs as $blog) {
        $id         = $blog['id'];
        $title      = $blog['title'];
        $content    = $blog['content'];
?>
        <h1> <?php echo $title; ?></h1>
        <h1> <?php echo $content; ?> </h1>      
<?php } ?>  

This my code. everytime i run this code, this error pops up:

Fatal error: Cannot use object of type stdClass as array

Please help.

0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.