Mu Beta Psi

National Honorary Musical Fraternity

press room

connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect); $artlist = mysql_query("SELECT articleid, title, url, approved FROM app_press WHERE approvedby IS NOT NULL ORDER BY approved DESC"); if (mysql_num_rows($artlist)) { while ($artinfo = mysql_fetch_array($artlist)) { if ($artinfo[url]) { // Split the domain name from the url preg_match("/^(http:\/\/)?([^\/]+)/i",$artinfo[url], $matches); $host = $matches[2]; preg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches); echo "» ".$artinfo[title]."  (".$matches[0].")
"; } else { echo "» ".$artinfo[title]."
"; } } } else { echo "No articles available"; } ?>


© 2008 Mu Beta Psi, Inc.