This part of a line:
strpos($row_fids['RemarksWithTime'], "Cancelled" == 0 )
Is all wrong, because the == 0 is within the function call, not a comparative to the return of that function call. Also what is the point of this if/else? Both true evaluation and false evaluation results in the exact same command, so why not just have that command?
if(strpos($row_fids['RemarksWithTime'], "Cancelled" == 0 )){
print $row_fids['RemarksWithTime'];
} else {
print $row_fids['RemarksWithTime'];
// END IF
}
Should just be
print $row_fids['RemarksWithTime'];
Since that is being run no matter the result of the if statement.