Jump to content

bwouters

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by bwouters

  1. The answer:

     

     

    $items = array();
    foreach ($rows as $row)
    {
    $items[] = array("item" => $row["item"],
    "brand" => $row["brand"],
    "number" => $row["number"],
    "price" => $row["price"],
    "start" => $row["start"],
    "end" => $row["end"],
    "shop" => $row["shop"],
    "location" => $row["location"],
    "link" => $row["link"]
    );
    }
  2. Dear Ingolme,

     

    Thank you so much!!! I spent hours looking at it and now due to your help it is working. I am really really thankful with your help!!

     

    Bart

  3. Dear reader,

     

    On my own server I created the following code that is working perfectly:

     

     

    $items = [];
    foreach ($rows as $row)
    {
    $items[] = [
    "item" => $row["item"],
    "brand" => $row["brand"],
    "number" => $row["number"],
    "price" => $row["price"],
    "start" => $row["start"],
    "end" => $row["end"],
    "shop" => $row["shop"],
    "location" => $row["location"],
    "link" => $row["link"]
    ];
    }
    However my hosting party is not supporting php 5.4 and therefor I transformed the code in:
    $items = array();
    foreach ($rows as $row)
    {
    $items = array("item" => $row["item"],
    "brand" => $row["brand"],
    "number" => $row["number"],
    "price" => $row["price"],
    "start" => $row["start"],
    "end" => $row["end"],
    "shop" => $row["shop"],
    "location" => $row["location"],
    "link" => $row["link"]
    );
    }
    and now I am getting the error msgs: "Uninitialized string offset: 0".
    Does anyone knows what I am doing wrong?
    Thanks inadvance for your help!!!
×
×
  • Create New...