Need help with PHP

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Need help with PHP
mrmagoo_83
CZ Newbie
mrmagoo_83 has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Website:
Status: Offline
Joined: Mar 01, 2004
0.00 posts per day
Posts: 25
Points: 5,106
   
I wasn't sure where to post this. I am working on a block, but I seem to have a problem with my array.

I was wondering if someone could show me some code to print the array out so I could examine the elements of my array and see where what is being stored.



Back to top Reply with quote
#2   re: Need help with PHP
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   
If you're just wanting to list the items in your array, you could try something like this:
$friends = array(1 => 'Joe', 'Bob', 'Tim');
print_r($friends);


It will display:
Array
(
    [1] => 'Joe'
    [2] => 'Bob'
    [3] => 'Tim'
)


Kelly


Back to top Reply with quote
#3   
mrmagoo_83
CZ Newbie
mrmagoo_83 has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Website:
Status: Offline
Joined: Mar 01, 2004
0.00 posts per day
Posts: 25
Points: 5,106
   
Ok, I already have the array built and filled, and stored as $array = array();

so if I do

print_r($array);

that should do the same thing right?



Back to top Reply with quote
#4   
mrmagoo_83
CZ Newbie
mrmagoo_83 has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Website:
Status: Offline
Joined: Mar 01, 2004
0.00 posts per day
Posts: 25
Points: 5,106
   
yep that worked nicely.

Now if I could just figure out why it isn't populating correctly. Or how to call what is populating. Thanks.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum