I have these arrays. i want the array values to be stored from database… but fetching data from database inside array with while loop isnt possible or may i am doing something wrong.
for example :
in this code :
echo json_encode(array(
array(
'id' => 111,
'title' => "Event1",
'start' => "$year-$month-10",
'url' => "http://yahoo.com/"
),
));
i want this part to be looped:
array(
‘id’ => 111,
‘title’ => “Event1”,
‘start’ => “$year-$month-10”,
‘url’ => “http://yahoo.com/”
),
… so i get somwthing like this :
echo json_encode(array(
array(
'id' => 111,
'title' => "Event1",
'start' => "$year-$month-10",
'url' => "http://yahoo.com/"
),
array(
'id' => 111,
'title' => "Event1",
'start' => "$year-$month-10",
'url' => "http://yahoo.com/"
),
array(
'id' => 111,
'title' => "Event1",
'start' => "$year-$month-10",
'url' => "http://yahoo.com/"
)
));