I have a script that parses a log file. All of the data is in this format:
Field: value
Field: value
Field: value
Field: value
Field: value
Field: value
The script takes the values and inserts them into a mysql database for each group of values. When it reaches a blank line it stops, inserts, and clears the variable. It repeats this for the rest of the groups. Now that I'm using php 4.3.3 the script no longer detects the blank line in the log and therefore tries to group all the values into one giant insert statement. this is what I'm using to detect a blank line:
if ($line == ereg("/$/", $line)){
insertData("$sql_values");
$sql_values = "";
}
This works fine on my laptop running php 4.2.3. Any ideas?