Jump to content

getting results into an array...?


glennn.php

Recommended Posts

i have some form fields such as "rent", "elec", "gas", etc...

 

where the values for these fields are stored in a db table with an item_id assigned to each item...

 

using this:

 

while ($row = mysql_fetch_array($result)) {

    echo $row['item_id'].": ".$row['amount'];

}

 

i'm not sure how to get the amounts for item_ids 13, 14, 15... into an array so that i can echo them elsewhere (in their respective textfields), 13 being "rent", 14 being "elec", etc...

 

thanks for the help

 

GN

Link to comment
https://forums.phpfreaks.com/topic/206524-getting-results-into-an-array/
Share on other sites

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.