Jump to content

Associative Arrays with a labeled key?


random1

Recommended Posts

How can you create an associative array with a labeled (text not numbered) key in PHP?

 

My current function brings back records from a mysql database as an associative array with a numbered index.

 

e.g. $results['text']['text_value]

 

Can I get it to use $results[4]['text_value'] instead?

Link to comment
https://forums.phpfreaks.com/topic/121786-associative-arrays-with-a-labeled-key/
Share on other sites

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.