Jump to content

indig0blue

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

indig0blue's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I was able to get the results to go into an array but now I am only able to get one row of the array in the variable. I need the '$assoc' variable in the code below to hold every row so all the rows will show up in the excel file. Here is the code i have for this: $row=0; while ($row=odbc_fetch_array($sql_result)) { $ItemNum = $row['ItemNum']; $Place = $row['Place']; $QR = 1; for ($i=0; $i<5; $i++) { $assoc = array(array("ItemNum" => $ItemNum, "Place" => $Place, "QR" => $QR)); //echo $assoc; } } Thank you very much in advance.
  2. I am using a SQL query to pull data that I need for a report. I can get it to print out just fine on screen, but I can't figure out how to get the data into an associative array. I have been playing with this for the past few days and cannot get over the hump on this one. Can someone please help? The reason i need to get this data into an associative array is because the data represents a report I need to export into Excel via the xlsStream class. Any help would be much appreciated. I need to get this done for my boss ASAP. Thanks. I am desperate.
×
×
  • 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.