Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>// ***********************************-={ 2012-12-08 - WB }=-*********************************** // COLLECT THE FREINDS ARRAY // ********************************************************************************************* $friends = $connection-&gt;get('statuses/friends_timeline'); //method that catches my friends'statuses on Twitter. // ***********************************-={ 2012-12-08 - WB }=-*********************************** // PRINTS THE ENTIRE ARRAY TO THE SCREEN // ********************************************************************************************* // var_dump($friends); //STILL WORKS, BUT TRY THE METHOD BELOW //This Is Just A Cleaner Way Of Dumping The Array print "&lt;PRE&gt;&lt;FONT COLOR=ORANGE&gt;"; print_r($friends); print "&lt;/FONT&gt;&lt;/PRE&gt;"; // ***********************************-={ 2012-12-08 - WB }=-*********************************** // TO WORK WITH INDVIDUAL KEY / VALUE PAIRS FROM ARRAY // AS YOU MENTIONED YOU WERE ATTEMPTING TO GET YOUR FRIENDS PIC // ********************************************************************************************* print "&lt;BR&gt;".$friends[5]; print "&lt;BR&gt;".$friends[6]; print "&lt;BR&gt;".$friends[7]; print "&lt;BR&gt;".$friends[8];// This One Should Be What You Are Looking For print "&lt;BR&gt;".$friends[9]; print "&lt;BR&gt;".$friends[10]; // ***********************************-={ 2012-12-08 - WB }=-*********************************** // NOT NEEDED UNLESS YOUR LOOKING TO RANDOMIZE LATER ON // ********************************************************************************************* //shuffle($friends);//THIS WILL PRINT THE ARRAY IN A RANDOM ORDER EACH TIME IT IS CALLED // ***********************************-={ 2012-12-08 - WB }=-*********************************** // YOUR IF STATEMENT IS GOOD PRACTICE. // SO IF WE DO NOT HAVE THE POPULATED ARRAY, LETS STOP HERE // ********************************************************************************************* if( is_array($friends)){ $counter = 0; //LETS ADD A COUNTER TO USE IN THE PRINT STATEMENT BELOW foreach ($friends as &amp;$friend_data) {//WORK WITH EACH KEY. THERE ARE ALOT OF WAYS TO DO THIS LIKE WITH for(), or explode(), OR array_walk ETC... print "Key: ".$counter."&lt;BR&gt;".$friend_data; $counter++; //Just Adds 1 To The Counter For Each Loop }//CLOSE YOUR FOR EACH STATEMENT } //CLOSE YOUR IF ARRAY EXISTS STATEMENT // ***********************************-={ 2012-12-08 - WB }=-*********************************** // FINALY I CLEARLY SEE IN YOUR CODE AS WELL AS YOUR STATEMENT YOU WANT ONE KEY VALUE PAIR. // SO HERE IS WHAT YOU ASKED FOR IN YOUR POST. // ********************************************************************************************* $friends = $connection-&gt;get('statuses/friends_timeline'); //COLLECT DATA. POPULATE YOUR ARRAY //var_dump($friends); //REMOVE COMMENT IF THE KEY/VALUE PAIR IS WRONG AND SELECT THE RIGHT ONE. $value = $friends[8]; //stick the right key val pair together and load it into the variable $value print "&lt;img src='". $value."' width='100' height='100'/&gt;"; //PRINT YOUR BUDDIES PIC TO THE PAGE. </code></pre> <p>It Looks Like #8 But I May Have Miss-Counted.</p> <p>Allow Me To Explain. The Code Above Will Output 6 keys To Your Browser Window Under The Var Dump. The Array Contains Key Value Pairs So To View The One You Are Wanting Type $arrayname[#]; </p> <p>So id_str Would Be $friends[5].</p> <p>Printing This Out To Your Browser Will Make It Clear But Like I Said. Hope This Helps.</p> <p>EDIT. I Type Like This And It Is Just The Way I Do Things. It Also Falls Under The Freedom Of Speech Act. If Your Not Able To Clearly Read This Than There Is An Option On This Page To Post Your Own Answer. If I Took The Time And Effort To Type Anything Out. I Would Like It To Remain How I Typed It. And I Will Continue Fixing It As Needed. </p> <p>People That Have Nothing Better To Do But Criticize Other Peoples Way Of Doing Things Need To Get A Life. I Am A Programmer Like Most Other People On This Site Who Takes The Time Out Of My Work Schedule To Help Others With Problems That I Have Ran In To Years Ago Or To This Very Day. </p> <p>I Have Also Taken The Time To Follow Up On This Guy That Seems To Have A Hard On For Me. And I Soon Found Out That Was Not The Case. He Is Just A Dick To Everyone.</p> <p>So, If i Type like this. oR iF i tYPE lIKE tHIS. or even like this. I Still Get My Point Across.</p> <p>Also, Charles, You Are The First Person I Have Ever Seen Say Anything About The Way I Type. Besides My Shift Key Gets The Beating, Not You. In Fact No Charles's Was Harmed In The Creation Of This Message. </p> <p>There Are Programmers Who Want To Help. Then There The Guys That Have Had A Few Years Under There Belt, Think They Know It All, And Want To Treat All Who They Think Are Less Than Them Like Trash. Please Everyone Follow His Posts And See What Conclusion You Draw.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload