In searching the web I can’t find a clear explanation of how to define an array with a key value combination and then how to reference the elements.
I want an array that has a key of date and description, this is for a MySQL result set.
This seems to be the correct definition:
$varDump = array('date', 'description');

Now when I go through a loop to fill what is the syntax for each element
$varDump('date')=> = mysql_result($result,$i,"DATE_FIELD");
Or
$varDump field2_DESCRIPTION=mysql_result($result,$i,"DESCRIPTION");

Is there a tutorial that will show me this quickly? Thanks

Recommended Answers

All 2 Replies

Got it, Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.