https://www.icyphoenix.com/viewtopic.php?f=17&t=10161&p=62157#p62157 ----------------------------------- mort Tue 11 Feb, 2020 08:00 Can't Switch Some Code I've Got And Need Help ----------------------------------- I can't get this to switch :oops: It prints On-Line correctly and if I echo the no_users_on-line separately - that works too ? [b]ANY[/b] help offered? will be appreciated.... :P Thanks. [code linenumbers=false]
'; $stmt = $database->query("SELECT status, username FROM " . USERS_TABLE . " WHERE status!=0 ORDER BY username ASC"); $stmt->execute(); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($results as $row) { $status_ol = intval($row['status']); $status = htmlEsc($row['username']); if($status_ol >= time()-15*60){ echo '
'.$status.',
'; } } if($status_ol == 0){echo '
'.$lang['no_users_online'].'
';} echo '
'.SCRSB.''.IMG_TSB.''; ?>[/code]