Response title
This is preview!
[{"Company Name":"ABC Inc","Mailing Address":"Springfield ZZ 12345","Phone":"1 (555) 555-5555","Fax":"1 (555) 555-5556","Email Address":"test@test.com"}]
<div class="table-responsive">
<table id="datable_1" class="table table-hover display pb-30" >
<thead>
<tr>
<th>Product</th>
<th>Variation</th>
<th>Department</th>
<th>Category</th>
<th>Air/Boat</th>
</tr>
</thead>
<tbody>
</tbody>
<script type='text/javascript'>
$(document).ready(function () {
/* call the php that has the php array which is json_encoded */
$.getJSON('dist/php/catalog.php', function (catalog) {
/* data will hold the php array as a javascript object */
$.each(catalog, function (catalog_key, catalog_val) {
$("table.table").append("<tr><td>" + catalog_val.item_name + "</td><td>" + catalog_val.variation + "</td><td>" + catalog_val.department + "</td><td>" + catalog_val.category + "</td><td>" + catalog_val.vessel_name + "</td></tr>");
});
});
});
</script>
</div>
© 2013 jQuery Foundation
Sponsored by and others.