SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't understand this at all - it was working fine and then quit.

    I'm getting the following error - and its been cached too so everyone else gets it:

    Code:
    Warning: Wrong datatype in array_walk() call in /home/aspen0/public_html/index.php3 on line 47
    now here is the code snippet:

    Code:
    	while($main = mysql_fetch_array($result1)){    
    	array_push($new_books, "$main[Title]|$main[BookID]");
    	}
    
    cache_variable("new_books");
    and

    Code:
    <?
     array_walk($new_books, 'printem');
    ?>
    Seems to me $new_books is an array so what the hell happened?

    Did my cache get corrupted or something?

    secondly does anyone know how to erase the cache? Or start a new one? Since I dont want this error to keep popping up since I set the cache for a LONG time.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay I added an if statement around the array walk..

    if($new_books){
    array_walk($new_books, 'printem');
    }

    And the array_walk doesn't get executed so this tells me that $new_books doesn't even exist...

    But it was cached....
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •