I have this piece of code:
<?php
require_once ('mercadopago.php');
$monto = $_POST['amount'];
$mp = new MP('XXXX', 'XXXXXXXXXXX');
$preference_data = array(
"items" => array(
array(
"title" => "item",
"quantity" => 1,
"currency_id" => "usd",
"unit_price" => HERE
)
)
);
$preference = $mp->create_preference ($preference_data);
?>
and I need to make the variable $monto that i define from a post send before to give its value to "Unit_price" where it says "HERE". I tried just writting $monto, but it didnt work.
there is some how i can do this? thanks u and sorry for my english. its not pretty good.