This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

post_array_item function

Defined in /init/custom_helpers.php, lines 120-123
Author LemonStand eCommerce Inc.
mixed function post_array_item(string $array_name, string $name, mixed $default=NULL)
$array_name string specifies the array element name in the POST data.
$name string specifies the array element key in the first array.
$default mixed specifies a default value.
{return} mixed returns the found array element value or the default value.
Finds an array in the POST data then finds and returns an element inside this array. If the array or the element do not exist, returns NULL or a value specified in the $default parameter.
This function is useful for extracting form field values if you use array notation for the form input element names. For example, if you have a form with the following fields
<input type="text" name="customer_form[first_name]">
<input type="text" name="customer_form[last_name]">
you can extract the first name field value with the following code:
$first_name = post_array_item('customer_form', 'first_name')
This function is a shortcut for Phpr_Request::post_array_item() method.

See Also