The code is quite simple:
echo 'RESP:'.$db->printList($pprofile);
What db->printList($pprofile); does is that it prints some more string. I’m basically putting the string RESP before the value returned by db->printList($pprofile);.
The problem is that the result is reversed. If db->printList($pprofile); returns A, then I always get this: A:RESP whereas I expect RESP:A.
I never have had a problem like this and I’m confused. I’m doing very similar things in many other places (with other types of inputs/outputs) in the same script with correct results. Any thoughts?
printListdoes not return value, it prints it and thats why you have reversed order (method is executed during concatenation, value is printed, then string is concatenated with nothing returned by method and printed withecho).