I've tried this: http://be.php.net/manual/en/function.mysql-list-fields.php, but there's too much detail here.
What I'm looking for is a function that returns an array of strings. This array should only contain the names of all columns that a certain table has.
So for instance, if I have a table with these columns:
username | email | gender |age | married | number_of_children | street | province
I should get the same thing as if I did this:
$vars = array('username','email','gender','age','married','number_of_children','street','province');
Is there a PHP function already that can do this? Or shall I need some SQL statements of my own?