$result = mysql_query("SELECT * FROM $tableName WHERE id=1");
$array = mysql_fetch_array($result);
$help_name = $array['name'];
$req = $array['req'];
//fetch result
echo json_encode($help_name);
Problem is I'm getting the result with double quotes, how to remove the double quotes
<?php
$name = "Aman";
$str = json_encode($name);
echo trim($str, '"'); // output : Aman
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With