PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have image galleries divided into categories and have while statements to iterate through the result set. But when the visitor hits the last image in the set, I want the "NEXT" option to change to a "RETURN" which will return to the list of categories. If I could use ELSE with WHILE, I could do this, but ELSE doesn't work with WHILE. So I need to tell the code what to do when the loop ends.
Here is the code, such as it is. The bottom IF statement doesn't work, but it tells you what I am trying to do.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Well, you misunderstood, but only because I wasn't clear. I want the RETURN link to show only when the last item in the recordset is reached, which is where NEXT doesn't apply.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.