/is', $content, $contentArray ); return $contentArray[0]; } # does what it says on the tin function removeWhitespace( $content ){ $content = preg_replace('/>(\s|\n|\r)*<', $content); return $content; } # reduces content to function stripCrapTags( $content ){ $content = preg_replace( '//' , '' , $content ); $content = preg_replace( '/<\/tbody>/' , '' , $content ); $content = preg_replace( '/.*?<\/td>/si' , '', $content ); return $content; } # what it says on the tin, turns teh hideous content into teh sensible list function makeAwesomeList( $content ){ $content = preg_replace( '//', "\n", $content); $content = preg_split( '/\n/', $content); return $content; } # aims at producing OldSchoolSoldier
function makeHtmlList( $userArray ){ sort($userArray); foreach($userArray as $displayname => $username){ list($displayname, $username) = split(',', $username); if (isset($username)) { echo "$displayname
"; } } } # we actualy call stuff here $pageContent = getPageContent( $pageID ); $pageContent = parseContentByTagName( $pageContent ); $pageContent = removeWhitespace( $pageContent ); $pageContent = stripCrapTags( $pageContent ); $userCSV = makeAwesomeList( $pageContent ); $EventualContent = makeHtmlList( $userCSV ); #echo print_r($userArray); echo $EventualContent; ?>