query($sql); $listings = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { $listings = []; // In a real app, log this error // error_log($e->getMessage()); } function time_ago($datetime) { $now = new DateTime; $ago = new DateTime($datetime); $diff = $now->diff($ago); $diff->w = floor($diff->d / 7); $diff->d -= $diff->w * 7; $string = array( 'y' => 'year', 'm' => 'month', 'w' => 'week', 'd' => 'day', 'h' => 'hour', 'i' => 'minute', 's' => 'second', ); foreach ($string as $k => &$v) { if ($diff->$k) { $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : ''); } else { unset($string[$k]); } } $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' ago' : 'just now'; } ?> NGO Dashboard - Food Rescue

Available Food Donations

Donation claimed!

There are currently no available food donations. Please check back later.

Quantity:

Pickup by: