Pesky newlines
It's interesting, looping through the labels.txt file gives us a $line that also has a \n at the end of it, thus a search for "House Finch" becomes just "House". But only on certain species? It seems that 95% of other species weren't affected by this newline. Anyways this fixes it :)
This commit is contained in:
@@ -70,7 +70,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" && isse
|
||||
// convert sci name to English name
|
||||
foreach($lines as $line){
|
||||
if(strpos($line, $todaytable['Sci_Name']) !== false){
|
||||
$engname = explode("_", $line)[1];
|
||||
$engname = trim(explode("_", $line)[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user