0

Following array data I have generated with mysql_fetch_array() using PHP.

Array ( 
       [0] => Array 
       ( 
        [0] => 4 
        [msg_id] => 4 
        [1] => 1 
        [uid_fk] => 1 
        [2] => dddddddddddddd88234234 
        [message] => dddddddddddddd88234234 
       ) 
       [1] => Array 
       ( 
        [0] => 3 
        [msg_id] => 3 
        [1] => 1 
        [uid_fk] => 1 
        [2] => 2324234 
        [message] => 2324234 
       )
       [2] => Array 
       (
         [0] => 2 
         [msg_id] => 2 
         [1] => 1 
         [uid_fk] => 1 
         [2] => 123123 
         [message] => 123123 
         )
     )
2
  • Why in the world do you want to use jquery for displaying your php array? Commented May 10, 2011 at 11:50
  • Atleat mention what you are intending to do. Commented May 10, 2011 at 11:51

1 Answer 1

1

You could json_encode(PHP) your array, then use $.parseJSON()(jQuery).

Sign up to request clarification or add additional context in comments.

1 Comment

I've made a jsFiddle example here with your array converted into JSON : http://jsfiddle.net/2NRKJ/1/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.