fixed typo in buildPHPArray