I wrote a program that reads data from a csv (saved as Unicode format in SQL Studio) and then does a few comparisons and prints out the results.
For some reason this simple if statement returns false eventhough when the data is printed it shows the correct results:
foreach ($complete as $key => $val){
$INVOICE = 'INVOICE';
$InvoiceType = $complete[$key][9];
echo 'comparing' . $InvoiceType.'to'. $INVOICE;
if ($InvoiceType == $INVOICE){
echo 'I am inside a invoice';
}
else if ($InvoiceType == 'CREDIT'){
$PayeeDocumentType = 'CM';echo 'I am inside a credit';
}
}
--------- Results ---------
comparingINVOICEtoINVOICEcomparingINVOICEtoINVOICE
var_dump($InvoiceType);var_dump$complete?