Php Query Result To Array Python Example