Hi,
my aim is to display the content of my json data i receive from my php file.
php is sending :
PHP--->
$arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
echo json_encode($ar r);
<---
AJAX--->
ajax is receiving "data" and displaying : data = {"a":1,"b":2,"c ":3,"d":4,"e":5 }
now, how can is display for exemple the item "c" to get "3" something like :
alert(' a = "+..--->what must i put here<-----.);
i tried : date[2], but it is not working ! is says : UNDEFINED
thx for your help
Boris
my aim is to display the content of my json data i receive from my php file.
php is sending :
PHP--->
$arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
echo json_encode($ar r);
<---
AJAX--->
ajax is receiving "data" and displaying : data = {"a":1,"b":2,"c ":3,"d":4,"e":5 }
now, how can is display for exemple the item "c" to get "3" something like :
alert(' a = "+..--->what must i put here<-----.);
i tried : date[2], but it is not working ! is says : UNDEFINED
thx for your help
Boris
Comment