0

h have this JSON format in my controller:

$scope.my = {
        data: [
          {d1: '',d2: '',d3: ''},
        ]
      };

i'm passing it to php file as follows:

$http.post('file.php',{"json":$scope.my.data}).success(function(myData){});

in php file i used json_decode but everything is empty !!

i searched for this problem and i tried different solutions but nothing work, please any one can help ??? how i can read it ?!!

Update// this what in my php file : $data =

json_decode(file_get_contents("php://input")); // this to recive the whole data
$rec_json=mysqli_real_escape_string($con, $data->json); // this to take the sent json 

now how i can decode $rec_json ?!!

Deffy Ham
  • 13
  • 3

0 Answers0