<?php

	// Set the constants
	define(PATH, '/home/jdare/Desktop/functions/');

	// Loop through the files
	$dir = opendir(PATH);
	while (($file = readdir($dir)) !== false) {
	
		// If it's a file
		if (is_file($file)) {
		
			// Grab the method line
			$myData = file_get_contents($file);
			$startPos = strpos($myData, '<span class="methodname"><b><b>');
			$endPos = strpos($myData, ')</div>');
			$line = substr($myData, $startPos, $endPos-$startPos);			
			//$myRegex = '|<span class="methodname"><b><b>.*\)</div>|';
			//preg_match_all($myRegex, $myData, $arr, PREG_PATTERN_ORDER);
			//$line = $arr[0][0];

			// Strip the html tags out
			$stripped = strip_tags($line);
			
			// Strip the newlines
			$stripped = str_replace("\n", '', $stripped);
			
			// Strip the spaces
			$stripped = str_replace(" ", '', $stripped);
			
			// Add some space
			$stripped = str_replace("(", " (", $stripped);
			$stripped = str_replace(",", ", ", $stripped);
			$stripped = str_replace("$", " $", $stripped);
			$stripped = str_replace("[", " [", $stripped);
			
			// Echo the data
			echo $stripped . ")\n";
			
		}
		
	}


?>
