Pipit: pipit_get()

pipit_get() is a utility function similar to perch_get(). The main difference is pipit_get() can handle arrays.

Given the URL /?country%5B%5D=brazil&country%5B%5D=australia you can get an array of the country values using:

$countries = pipit_get('country');

Given the URL /?country=brazil, the above will get you a string like perch_get() does. You can have this returned as an array by setting the second parameter to true:

$countries = pipit_get('country', true);

Given the URL / (no country parameter set), you can specify a default value in the third parameter:

$countries = pipit_get('country', false, 'Italy');