This is an amateur question (so apologies in advance if im overlooking something really obvious but i've been hunting around PHP.net for some clues but havent figured it out yet), im deciphering this code someone else did for a friends site and kind of just got lost.
what the code is doing is creating an array for a database, and then the site is calling the information back based on time stamps and the sort. for some reason some things aren't showing up so i'm just trying to get my head through it:
$TYPES_EXPO = array("Type1","Type2","Type3","Type4","Type5","Type6","Type7");
$currentarray = $debe->runSql("SELECT * FROM expositions WHERE from<='$nu' AND to>='$nu' ORDER BY from");
if(count($currentarray)>0)
echo "<h1>Current Exhibitions</h1>";
for($i=0; $i<count($currentarray);$i++)
{
echo "<b>" . $currentarray[$i][3] . "</b>";
so in that last line, what is the [3] referencing? theres more of it in other parts of the code, different integers such as [6] and [7] in that similar configuration which seem arbitrary to me, just can't seem to get my finger on it…
var_dump($currentarray)and you'll see what's happening inside. looks like it's just an array dereference, selecting the 4th (0-based 3) column of a row of data in the result set.