why this code give error like "Warning: json_decode() expects parameter 1 to be string, array given in <b>E:\wamp\www\datefun\show_cart_update.php</b> on line". Please help me. I am new in php and json
<html>
<head>
<title>Untitled Document</title>
<script src="js/jquery-1.9.1.min.js"></script>
</head>
<body>
<script>
function update_cart_detail()
{
var aData = new Array();
aData[0]={
"session_id":"64qu9ng2o8o996s21bjt9321h1",
"order_id":"26",
"design_id":"21",
"order_pcs":2,
"item_rate":1000,
"item_amt":2000
}
aData[1]={
"session_id":"64qu9ng2o8o996s21bjt9321h1",
"order_id":"26",
"design_id":"25",
"order_pcs":1,
"item_rate":2000,
"item_amt":2000
}
var jTableData = JSON.stringify(aData);
return jTableData;
}
$(document).ready(function(){
$("#update_cart").click(function(){
//my jsons data prepare like
var jSonsData=update_cart_detail();
$.post('show_cart_update.php', jSonsData, function(data){
alert( data );
})
.fail(function() {
alert( "Posting failed." );
});
return false;
});
});
</script>
<button type="submit" name="update_cart_action" value="update_qty" id="update_cart" title="Update Cart" class="button btn-update" onClick="update_cart_detail()"><span><span>Update Cart</span></span></button>
</body>
</html>