Reputation: 5629
I pass a JSON array to a PHP function with ajax like this:
$.ajax({ url: 'php/processing.php',
data: {action: 'orderLater', kundenDatenArray: kundenDaten},
type: 'post',
success: function(output) {
alert(output);
}
});
and now I want to generate a PDF out of this so I have to access the array in PHP.
I tried this:
function sendLater($in){
$filename = "../pdfs/".$in[0]->vorname."_".$in["nachname"].".pdf";
echo var_dump($in);
//echo $filename;
exit();
the $in var looks like this when I do var_dump
how do I access the array:
$in[0]->vorname
$in["nachname"]
$in[0]["nachname"]
non of these are working ...
Upvotes: 0
Views: 52