How can I query Google Spreadsheets API with a string value?

Posted by ColinM on Stack Overflow See other posts from Stack Overflow or by ColinM
Published on 2010-06-09T01:23:31Z Indexed on 2010/06/09 1:32 UTC
Read the original article Hit count: 303

I am using Zend_Gdata_SpreadsheetsListQuery. In PHP my query is:

"confirmation=$confirmation"

The problem is that $confirmation = 'AB-CD-EFG-012345'; Apparently the hyphens are causing problems with the query and the exception thrown is:

Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400 Parse error: Invalid token encountered'

How can I quote or escape the value to not cause parse errors? Single quotes cause the same error, double quotes don't throw errors but there are no results to match.

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework