Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv14169

Modified Files:
        data_retrieval.php 
Log Message:
Max Hammond <[EMAIL PROTECTED]> suggested that I should use
ereg_replace() instead of str_replace, so that we also catches
triple-spaces etc.


Index: data_retrieval.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- data_retrieval.php  2001/04/27 19:07:02     1.6
+++ data_retrieval.php  2001/04/29 18:39:15     1.7
@@ -167,7 +167,7 @@
       }
       
       /* We don't want any double-spaces in our METAR */
-      $metar = str_replace('  ', ' ', $metar);
+      $metar = ereg_replace('[ ]+', ' ', $metar);
       
       $date = explode(':', strtr($date, '/ ', '::'));
       if ($date[2] > gmdate('j')) {


_______________________________________________
PHPWeather-checkins mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/phpweather-checkins

Reply via email to