return array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All, 

how to return array var from function ??

I have try that but just can't return it..

here's my code :(function to return any fields name from table)

   function fields($table,$db_name)
{ $link=$this->database(); // this open the database connection
     $fields = mysql_list_fields($db_name, $table, $link);
              $columns = mysql_num_fields($fields);
              for ($i = 0; $i < $columns; $i++) {
                 $field[$i] = mysql_field_name($fields, $i);}
     return $field[];
     }

Thanx a lot
Sukanto

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux