I have a script that loops through a multidimensional array, accessing various values, comparing them to values in a mysql database. If a match found, then the mysql values are updated. If no match, then
print("hi");
Actually, I did have the code which inserted a new row into mysql but I found that that was NOT the problem. Infact the following code times the duration it takes to output "hi"
if($not_found_in_db){
$start_time = microtime();
print("hi");
$end_time = microtime();
print("<br />This took: " . ($end_time - $start_time) . " seconds<br />");
exit();
}
The time that is output is typically between 0.6 seconds and 0.9 seconds
Since my script may run through this loop around 50,000 times... this would take ages even without having the code that inserts into mysql! Could it be the timing code itself? If so, why would it take so long?
Any help would be great!
- John