hi, friends in this service I get output, but I think different outputs let me explain
$customer_id = $_POST["customer_id"];
$response = array();
$qry="SELECT category FROM nesbaty_customer where c_id="".$customer_id."" ";
$qry_res=mysqli_query($con,$qry);
$jsonData = array();
while ($array = mysqli_fetch_assoc($qry_res))
{
$r= $array["category"];
$jsonData[]=explode(",",$r);
}
echo json_encode(array("data" =>$jsonData));
mysqli_close($con);
I get this output
{
"data": [
[
"Hotel",
"Saloon"
]
]
but I want this output!
{
"data": [
[
"category": "Hotel",
"category": "Saloon"
]
]