for the life of me, im overlooking something. this line is inside of a loop but at the end, it only has the last record. why???
Thanks in advance
$response = array();
while ($row = mysqli_fetch_array($get_tour,MYSQLI_ASSOC))
{
$response = array(["name"=>"$tour_name","dates"=>"$print_start","datee"=>"$print_end","location"=>"$city,$state"]);
}
echo json_encode($response);
[{"name":"TURKEY RUN EVENT-OPEN-$595","dates":"11-16-2024","datee":"11-17-2024","location":"Redding,CA"}]
Thanks in advance
$response = array();
while ($row = mysqli_fetch_array($get_tour,MYSQLI_ASSOC))
{
$response = array(["name"=>"$tour_name","dates"=>"$print_start","datee"=>"$print_end","location"=>"$city,$state"]);
}
echo json_encode($response);
[{"name":"TURKEY RUN EVENT-OPEN-$595","dates":"11-16-2024","datee":"11-17-2024","location":"Redding,CA"}]