[PHP] How do I pass parameters to the getContacts function ?


[PHP] How do I pass parameters to the getContacts function ?

Hi there, 

I am a newcomer to PHP development and I was wondering how I could define the limit and status parameters of the getContacts function using your PHP Wrapper from GitHub. I have the function working but without any parameters. I don't understand how to create the $params array that withholds these parameters. A code snippet would be nice.

Thank you for your answer !

CTCT Employee

Re: [PHP] How do I pass parameters to the getContacts function ?


In the wrapper, the params are set as an associative array (or a hash), which will allow you to specify more than one of them. This is done as key and value pairs, with the key being 'limit', 'status', or any other parameter and the value will be the specified value. The code to set these is as follows:


$params = array (
'limit' => 500,
'status' => 'ACTIVE');


More informatoin about the parameters that can be set can be found at:




When this is passed to the getContacts method, it will act within the confines of these parameters.


Thank you,
Josh Kirch
Web Services

Developer Portal

View API documentation, code samples, get your API key.

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More