<?php

// Filter output data
// (remove passwords and private info)

$events = array();
    while ($event =  mysql_fetch_assoc($records))
    {
        $events[] = $event;
    }
    foreach ($events as $event)
    {
		<?php echo $event['image']; ?>
	}
    
$out = [
    'events' => $events
];

echo json_encode($out);