this is my php code:
<?php
//Creating a connection
$con = mysqli_connect("****","****","****","****");
$con->set_charset("utf8");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$strcode = $_GET["id"];
$sql = "Select movie_image from map_table2 where movie_image = '".$strcode."' ORDER BY id DESC LIMIT 1 ";
$result = mysqli_query($con ,$sql);
while ($row = mysqli_fetch_assoc($result)) {
$array[] = $row;
}
header('Content-Type: text/html; charset=utf-8');
echo json_encode($array, JSON_UNESCAPED_UNICODE );
mysqli_free_result($result);
mysqli_close($con);
?>
When I run the php, I get this data:
[{"movie_image":"231320166"}]
But I want to get this data:
231320166
What code should I use?