Javascript Array - & gt; Objects in PHP?

  • 0
    Please tell me how to transfer an array with objects to php?

    HTML
    <input type="file" id="application" name="application" multiple accept="application/pdf">


    JS
    var arr = [
    		  {name:'pdf1', size:'123', type:'pdf'},
    		  {name:'pdf2', size:'321', type:'pdf'},
    		]


    PHP

    $php_array=  json_decode($_POST["application"],true);
         print_r( $php_array) // пусто
    JavaScript Anonymous, Oct 14, 2019

  • 1 Answers
  • 0
    type = "file"


    accept = "application / pdf"




    where is the js object and how should it work?
    Eden Hardin

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!