do_query($query); $row = mysql_fetch_assoc($plot_tides); // Get the current date $mon = date("n"); $d = date("j"); $year = date("Y"); $date_string = "" . $mon . "/" . $d . "/" . $year; $lines = $row[tide_data]; $station = $row[tide_station]; // end pulling tidal data // begin html echo "Todays Tides at
$station


"; // extract our data and format for output preg_match_all("|$date_string(\s*\d{1,2}:\d{2,2}[AP]M\s*-?\d+.\d+\s*[HL]){1,4}|",$lines,$matches); $num = count($matches[0]); for ($i=0;$i<1;$i++) { preg_match("|\d{1,2}/\d{1,2}/\d{4,4}|",$matches[0][$i],$date); preg_match_all("|\d{1,2}:\d{2,2}[AP]M\s*-?\d+.\d+\s*[HL]|",$matches[0][$i],$tideinfo); echo "".($date[0]."
"); for ($j=0;$j<=count($tideinfo[0]);$j++) { echo ($tideinfo[0][$j]."
"); } } // finish our html echo "Get More Tides
"; echo "Tide Sticker Powered By $tides_poweredby"; // End Tides ?>