RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Function Problem. Please help

Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Function Problem. Please help

  #2  
Jul 1st, 2005
There are two things you need to do to troubleshoot this problem. INSIDE your function, at the very top, do this:

First, echo out one of the arrays like this:
[PHP]
echo "<pre>";
print_r($Date_Added);
echo "</pre>";
[/PHP]

Then echo out the value of $num:
[PHP]
echo "<hr />".$num;
[/PHP]

You should see that $num = 0, but that your array does not even exist. You forgot one important line at the top of your function:
[PHP]
global $Date_Added, $Sample_Views;
[/PHP]
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:46 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC