I have some code that runs fine until it hits this:
if(array_key_exists($snIdx, $fields));
$surnameField = trim($fields[$snIdx]);
or other version I tried:
if(isset($fields[$snIdx));
$surnameField = trim($fields[$snIdx]);
The $snIdx = -1
.
It gives me Undefined offset error at second line ($surname = trim...
).
I think I don't need to paste rest of code as the exception says there is sth wrong with those functions. My PHP version is 5.4.16.