[0] => stdClass Object ([id] => 1 [name] => Yandex [url] => http://www.yandex.ru [status] => 1)

[1] => stdClass Object ( [id] => 2 [name] => VKontakte [url] => http;//www.vk.com [status] => 1 ) [2] => stdClass Object ( [id] => 3 [name] => Google [url] => http://www.google.co [status] => 1 ) [3] => stdClass Object ( [id] => 4 [name] => Mail.ru [url] => http://www.mail.ru [status] => 1 ) [4] => stdClass Object ( [id] => 5 [name] => Rambler [url] => http://www.rambler.r [status] => 1 ) [5] => stdClass Object ( [id] => 6 [name] => Wikipedia [url] => https://ru.wikipedia [status] => 1 ) [6] => stdClass Object ( [id] => 7 [name] => YouTube [url] => http://www.youtube.c [status] => 1 ) [7] => stdClass Object ( [id] => 8 [name] => Gmail [url] => http://www.gmail.com [status] => 1 ) [8] => stdClass Object ( [id] => 9 [name] => Microsoft [url] => https://www.microsof [status] => 1 ) [9] => stdClass Object ( [id] => 10 [name] => PrOffice [url] => https://products.off [status] => 1 ) [10] => stdClass Object ( [id] => 11 [name] => MySQL [url] => http://www.mysql.ru/ [status] => 1 ) 

It is necessary that this data through the foreach loop be filled into a table

    1 answer 1

     <table> <?php foreach($array as $val) : ?> <tr> <td><?php echo $val->name; ?></td> </tr> <?php endforeach; ?> </table> 

    I gave you an example, and then build the structure of the table as you like.

    • A PHP Error was encountered Severity: Notice Message: Undefined variable: array Filename: views / welcome_message.php Line Number: 29 Backtrace: File: H: \ home \ test1.ru \ www \ application \ views \ welcome_message.php Line: 29 Function: _error_handler File: H: \ home \ test1.ru \ www \ application \ controllers \ Welcome.php Line: 18 Function: view File: H: \ home \ test1.ru \ www \ index.php Line: 315 Function: require_once - Shufler3
    • 29 <? Php foreach ($ array as $ val):?> - Shufler3
    • instead of $array specify the name of your array - P. Fateev
    • All the rules, I made a mistake here myself thanks - Shufler3