I've written the code below:
$release_id = intval(filter_var($_GET["rid"],FILTER_SANITIZE_STRING));
$query = "select * from press_releases where id = {$release_id}";
$result = $db->query($query);
$row = $result->fetch_assoc();
list($id, $short_description, $description, $created_date) = $row;
$db->close();
and I am using the variables such as $description, $short_description inside of the html tags but nothing shows. If I use the code below which is same except for the list() function:
$release_id = intval(filter_var($_GET["rid"],FILTER_SANITIZE_STRING));
$query = "select * from press_releases where id = {$release_id}";
$result = $db->query($query);
$row = $result->fetch_assoc();
$id = $row["id"];
$short_description = $row["short_description"];
$description = stripslashes(html_entity_decode($row["description"]));
$created_date = $row["created_date"];
$db->close();
it works perfectly. Basically list() function cannot assign the values coming from the $row array.
I don't understand why?