Man you weren't kidding when you said "noobie". You've got it backwards. Your query could be improved too...
PHP Code:
$array = array();
$query = "SELECT * From ".TABLE_PREFIX."gun_ranges where state = '$state' ";
$data = $vbulletin->db->query_read( $query );
$count = 0;
while ($row = $vbulletin->db->fetch_array($data))
{
$array[$count]['website'] = $row['website']; //gun range website
$array[$count]['phone'] = $row['phone']; //gun range phone number
//etc....
$count+=1;
}
echo "0's Website: ". $array[0]['website'];
Alternatively...
PHP Code:
$array = array();
$query = "SELECT * From ".TABLE_PREFIX."gun_ranges where state = '$state' ";
$data = $vbulletin->db->query_read( $query );
$count = 0;
while ($row = $vbulletin->db->fetch_array($data))
{
$array[$count] = $row; //copies everything all at once
$count+=1;
}
echo "0's Website: ". $array[0]['website'];