Execute("select * from loves ORDER BY id DESC LIMIT 25"); while ($array = $rs->FetchRow()) { //assign values from current row $id = $array['id']; $phrase = $array['phrase']; $timestamp = $array['stamp']; $ip_value = $array['ip']; $countryFlag = getCountryFlag( $ip_value ); // get the stamp when it was added to DB $diff = get_time_difference($timestamp); print '
'; print '♥  '; print ''.htmlentities(strip_tags($phrase)).' '; print ' '.$diff.''; //print ''.$diff.''; print '
'; } ?>