PHP Classes

Foreach Error on the last page.

Recommend this page to a friend!

      MSSQL Pagination  >  All threads  >  Foreach Error on the last page.  >  (Un) Subscribe thread alerts  
Subject:Foreach Error on the last page.
Summary:Error when you try using a foreach statement on the last page of
Messages:1
Author:Steve Barbera
Date:2008-06-20 15:29:21
 

  1. Foreach Error on the last page.   Reply   Report abuse  
Picture of Steve Barbera Steve Barbera - 2008-06-20 15:29:21
I have figured out my problem on the previous thread and i'm able to output the mssql_fetch_array and set the varname to the value.

But when you click on the last page of the pagination the foreach loop will throw an error if it doesn't have arrays to go through.

Warning: Invalid argument supplied for foreach().
Is there a way to get around this? and prevent the script for trying to grab the all of the rows?

Thanks,
Steve