prepare($sql); $stmt->execute(); $users = $stmt->fetchAll(PDO::FETCH_ASSOC); //create the select dropdown list of users echo ''; ?>
1, 'name'=>'John'), array('id'=>2, 'name'=>'Mary'), array('id'=>3, 'name'=>'Bob') ); //create the select dropdown list of users echo ''; ?>Package/library used: PDO (in example 1).