I'm using PayPal's _cart form to take payment on a site I am building. I'm then using the notify_url to post the submitted fields to a PHP page that will in turn use the SendGrid API to send a confirmation email. This all works fine, but what I am wanting to do is create an 'order summary' of the items purchased (which can be multiple).
foreach ($i = 1; $i <= $_POST['num_cart_items']; $i++) {
$name = $_POST['item_name' . $i];
$number = $_POST['item_number' . $i];
$quantity = $_POST['quantity' . $i];
}
What I am wanting to do is build an array out of the above so I can use $cart as $order, for example. Is it possible to make the above foreach build into an array?