Jump to content

firelior

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by firelior

  1. Hi, I got this code: [code] $result = mysql_query("select title from content"); $row = mysql_fetch_object($result); while($row = mysql_fetch_object($result)){     foreach ($row as $key => $val){       $elements=array($key => $row->$key);     } } [/code] And all of the time it returns only the last one. for example if I got this table: [table][tr][td]title[/td][/tr][tr][td]home[/td][/tr][tr][td]news[/td][/tr][tr][td]about us[/td][/tr][/table] it will return only "about us" I want it to return all of them like this: [code] array(array('name' => 'home),array('name' => 'news'),array('name' => 'about us')) [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.