javascript - How do I grab the objects from php Twitter API -


so can tweets using twitter oauth can echo tweets using foreach. want grab data php , bring them page.

index.php contains json array of tweets.

then in page2.php have code below display specific objects using $.ajax index.php

   $.ajax({      datatype: "html",      url: 'index.php',      success:function(data){     //$('#tweets').html(data['text']);     $.each(data, function () {     list += '<p>'+ this.text +'</p>'; });     $('#tweets').html(list); } 

});

but when try specify particular object grab text no results. use

 data['text']  

or

data->text 

from observing current code, you're using jquery method send data php file.

i 99% sure following should work:

$_get['list']; 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -