jQuery Load MySQL Fetch Array

Posted by Robert Hanson on Stack Overflow See other posts from Stack Overflow or by Robert Hanson
Published on 2012-06-12T04:16:30Z Indexed on 2012/06/12 4:40 UTC
Read the original article Hit count: 148

Filed under:
|

I'm a beginner in jQuery area and I have simple question like this :

I want to load (AJAX) MySQL result in array, let's say :

$row[0] = first name
$row[1] = last name
$row[2] = phone number

I have no problem with PHP part, but I have difficulties to display each of that array content on different id. because syntax I found loads everything processed by PHP :

<script type="text/javascript">
$(document).ready(function(){
    $('#mysql-result').load('ajax.php');
});
</script>

how to get 'First Name', 'Last Name' and 'Phone Number' from PHP with only one time load and still I can put the result in different . thank you.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about AJAX