<?php 
include("../../db.php");

header('Content-Type: application/json');

    $status = 0;

    $subjectArray = array();
    
    $array = array();

	$allSubject = $db->getRows("select image from slider ");
    if(count($allSubject) > 0){
        $status = 1;

    	foreach($allSubject as $subject){
            // array_push($subjectArray, ["https://$_SERVER[HTTP_HOST]/uploads/slider/$subject[image]"] );
            $subjectArray[] = "https://$_SERVER[HTTP_HOST]/uploads/slider/$subject[image]";
    	}

    }
 
 $array['status'] = $status;
 $array['slider'] = $subjectArray;
 
 echo json_encode($array);
?>