Play Free Games - Action Games - Racing Games - Dress Up Games | DailyFreeGames.com DailyFreeGames is a great place to play free online games, including: action games, racing games, and dress up games. http://www.dailyfreegames.com/ en-us '' order by date_time DESC limit 12"; $q = "SELECT * FROM ec_content WHERE content_trash=0 AND date_time <= '".$datetoday."' AND content_thumbbig <> '' AND content_average >= 8.00 AND content_totalvotes >= 5 ORDER BY `date_time` DESC LIMIT 12"; $doGet=mysql_query($q); function getsubcat($subcatid){ $subcatsql= "select * from ec_subcat where subcat_id=$subcatid and subcat_trash=0"; $subcatresults = mysql_query($subcatsql) or die("cannot pull number of sub category"); $subcatrows = mysql_fetch_array($subcatresults); $subcatname = $subcatrows["subcat_name"]; return $subcatname; } function removespecialchars($string){ $text = str_replace("/","",$string); $text = str_replace("&","",$text); $text = preg_replace('/\s\s+/', ' ', $text); $text = strtolower($text); $text = str_replace(" ","-",$text); return $text; } while($result = mysql_fetch_array($doGet)){ $content = unserialize($result["content_var"]); $subid = $result["content_subcat"]; $subname = getsubcat($subid); $link = "http://www.dailyfreegames.com/games/".removespecialchars($subname)."/".removespecialchars($result['content_name']).".html"; //$mydate = date("F j, Y H:i:s", strtotime($result['date_time'])); //$mydate1 = date("F j, Y H:i:s", strtotime($result['date_time'])); $mydate = date('r', strtotime($result['date_time'])); /* $d = date( 'Y-m-d H:i:s T', time($result['date_time']) ); $mydate = gmdate(DATE_RFC822, strtotime($d)); */ ?>