入力:
$sql1 = "SELECT COUNT(*) FROM matchTrip where userTripId = :tripId";
$stmt1 = $this->db->prepare($sql1);
$stmt1->bindParam(':tripId', $trip, PDO::PARAM_INT);
$temp = $stmt1->fetchObject();
echo(json_encode($temp));
出力:
How to take value from array :
of which json_encode looks like this: {"COUNT(*)":"7"}
どんな助けでも大歓迎です。