Jump to content

Automatically generating arrays based on database columns


monkeypaw201

Recommended Posts

If I were to have a database with 20 columns, and wanted to query it and have an associative array called `table` automatically have all of the database columns added to it, how would I do that?

 

Meaning, later on in the script, I could call a specific value (each query is LIMIT 1)

 

echo $table['column3'];

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.