[php] PHP function to build query string from array