In PHP, I have an array which I created and usueally the value of that array are like ['a','b','c'], but I dont know why, my array is in this form : [['a'],['b'],['c']] Here is my code :
<?php
$res1 = array();
$result1 = mysqli_query($con,$dfcv) ;
while($row2 = mysqli_fetch_array($result1)){
array_push($res1, array(
$row2['username2'])
);
}
echo json_encode($res1);
?>