-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsondecoded.php
More file actions
33 lines (33 loc) · 782 Bytes
/
jsondecoded.php
File metadata and controls
33 lines (33 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
<head>
<script src="https://code.jquery.com/jquery-migrate-1.4.1.min.js"></script>
</head>
<body>
<div id="output">this element will be accessed by jquery and this text replaced</div>
<script>
$(function()
{
$.ajax({
url:'jsonencoded.php',
data:="",
dataType:'json',
success:function(data)
{
for(var i in data)
{
var data=data[i];
var id=data[0];
var name=data[1];
$('#output').append("<b>id: </b>"+id+"<b> name: </b>"+name).append("<hr />");
}
// var id=data['id'];
// var name=data['name'];
// var img=data['image'];
// var step=data['steps'];
// $('#output').html("<b>id: </b>"+id+"<b> name: </b>"+name);
}
});
});
</script>
</body>
</html>