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!!!