I am currently using php to open a csv file, check down for a cell containing particular content and using if-else to gain spicific information. However, I need to check if a cell contains PART of some information.
e.g.
current code:
$error_handle = fopen("$reportUrl", "r");
while (!feof($error_handle) )
{
$line_of_text = fgetcsv($error_handle, 1024);
if($line_of_text[0] !== "")
{
$countErrors++;
}
}
fclose($error_handle);
code I want:
$error_handle = fopen("$reportUrl", "r");
while (!feof($error_handle) )
{
$line_of_text = fgetcsv($error_handle, 1024);
if($line_of_text[4] == "$date *")
{
$countErrors++;
}
}
fclose($error_handle);
the '*' is representing a time that will be different for each line of text so can't be used but is part of the same cell. How do I select the cells with the same date but different times?
FYI, the date format would usually be '15/01/2013 12:06pm'