PHP & JSON JAVASCRIPT
Posted: Fri Apr 22, 2011 9:39 am
Hi
test.php
test2.php
Html file
[text]
<a>odd ,/a>
<a >even</a>
<div id="test"></div>
[/text]
[text]
when user click odd link, need to display 1,3,5,7 & when user click even link 2,4,6 need to display in the idv tag.
Please guide me how to do this part.
[/text]
test.php
Code: Select all
1,3,5,7
Code: Select all
header('Content-type: application/json');
echo json_encode(array(4, 5, 8, 9, 12, 32));
[text]
<a>odd ,/a>
<a >even</a>
<div id="test"></div>
[/text]
[text]
when user click odd link, need to display 1,3,5,7 & when user click even link 2,4,6 need to display in the idv tag.
Please guide me how to do this part.
[/text]