I have some URL mysite.com/json.php, which returns something like this : [{"invoice_number":"INV#20101"}]
on another page I have a <input type="hidden" id="myinvoice" />
I just wanted to set that invoice_number value to this hidden field withJQuery. How can I do this?
on JSON page I have converted JSON with this code :
 <?php
$return_arr = array();
$fetch = mysql_query("SELECT invoice_number FROM db_stocks ORDER BY stock_id DESC LIMIT 1 "); 
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
    $row_array['invoice_number'] = $row['invoice_number'];
    array_push($return_arr,$row_array);
}
echo json_encode($return_arr);
?>
 
     
     
     
    