Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:
Code: [Select]while($row = mysqli_fetch_assoc($result)) {
print_r($row);
}
But this returns multiple arrays like:
Code: [Select]Array ( [key] => air_conditioning [label] => Air Conditioning ) Array ( [key] => balcony [label] => Balcony ) Array ( [key] => cable [label] => Cable ) Array ( [key] => cleaning_service [label] => Cleaning Service ) Array ( [key] => data_ports [label] => Data Ports ) Array ( [key] => dishwasher [label] => Dishwasher ) Array ( [key] => fireplace [label] => Fireplace ) Array ( [key] => fitness_center [label] => Fitness Center ) Array ( [key] => garage [label] => Garage ) Array ( [key] => hardwood_floors [label] => Hardwood Floors ) Array ( [key] => internet [label] => Internet ) Array ( [key] => jacuzzi [label] => Jacuzzi ) Array ( [key] => kitchen_island [label] => Kitchen Island ) Array ( [key] => ocean_view [label] => Ocean View ) Array ( [key] => paid_electricity [label] => Electricity ) Array ( [key] => paid_gas [label] => Gas ) Array ( [key] => paid_water [label] => Water ) Array ( [key] => pool [label] => Pool ) Array ( [key] => refrigerator [label] => Refrigerator ) Array ( [key] => secured_entry [label] => Secured Entry ) Array ( [key] => security_system [label] => Security System ) Array ( [key] => stove [label] => Stove ) Array ( [key] => tennis_court [label] => Tennis Court ) Array ( [key] => underground_parking [label] => Underground Parking ) Array ( [key] => walk_in_closets [label] => Walk In Closets ) Array ( [key] => washer_and_dryer [label] => Washer and Dryer ) Array ( [key] => yard [label] => Yard )
Is there a way to return a single array like:
Code: [Select]array(air_conditioning => Air Conditioning, balcony => Balcony, cable => Cable, etc...)
Thanks.
array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I have a .csv file with about 300 records in it. The code worked perfect while testing on 3 or 4
Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and over again to set up these new laptops, we log on to this website and have to select all this stuff. I
RadioButtonList data selection
view plaincopy to clipboardprint?<asp:RadioButtonList ID="type" runat="server" TextAlign="left" CssClass="contactTypeRadio"> <asp:ListItem Value="Inquiry" Selected="True" />
mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP function.Seems as though mysql_affected_rows() is not returning the desired number so I can move into my
Trouble with a select list
Hello All! I was wondering if any of you guys could help me with a small problem I'm having!I'm trying to add a select list to a form on my webpage.The select list is generated from information
Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past 3-5 hours and have found nothing that'll help me.This is a project for school, and well I have to
checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that would be great. I have search google and this forum but have not found what i am looking for.thankswhen
printing links
Hi every1i am connecting to a table in sql and the looping through with a while ($ var = my sql fetch array)the question i have is that when i print_r($var)i get the associative array of all elements
function to return url
Hi,Can you guys help me giving a function that takes all the contents in a particular field and returns text and url seperately...For instance,Go:here is the linkwww.google.comit takes all the
Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on different pages. The I can't figure out how to do it or if it's even possible. When I access the