Posted By

karthikeyan on 09/11/13


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


json with php

 / Published in: PHP

While using ajax php file will be return json array and parse that from response tag and use it.

  1. //$productData is array element
  2. echo json_encode($productData);exit;
  4. var option = JSON.parse(res);
  5. $.each(option, function(key, val){
  6. alert(val['filedname']);
  7. });

Report this snippet  

You need to login to post a comment.