Jump to content

how does this type of array operate in php ?


linux1880

Recommended Posts

Well the first is grabbing an item from the $data array, based on the value of $row['id']. So if $row['id'] is set to 5 then the following

echo $data[$row['id']];

 

Is the same as

echo $data[5];

 

This

$options['data']=$row[0];

Is just variable assignment. Except they are arrays.

 

 

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.