mofm Posted April 20, 2008 Share Posted April 20, 2008 does anyone have any ideas on whats wrong ... i don't get any errors the page returns blank and $album_id is empty <?php require '../includes/functions.php'; require '../includes/connect.php'; require '../includes/settings.php'; session_start(); /************************************************************ Adjust the headers... ************************************************************/ header("Expires: Thu, 17 May 2001 10:17:17 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 if(empty($album_id)) { $albums_query = "SELECT * FROM albums"; if($albums_result=mysql_query($albums_query)) { $counter=0; $albums=array(); while($albums_array=mysql_fetch_array($albums_result)) { $albums[$counter]['title']=$albums_array['name']; $albums[$counter]['description']=$albums_array['description']; $albums[$counter]['user']=$albums_array['userid']; $albums[$counter]['image']=$albums_array['image']; $albums[$counter]['user']=$albums_array['user']; $albums[$counter]['date']=$albums_array['date']; $albums[$counter]['id']=$albums_array['id']; $counter+1; } $counter2=0; echo"<TR>"; while ($counter2<$counter) { if ($counter2%4==0) { echo"</TR><TR>"; } echo "<td colspan=\"3\">".$albums[$counter2]['title']."</td>"; echo "<td colspan=\"3\">".$albums[$counter2]['title']."</td>"; $counter2+1; } echo "</TR>"; }else{ echo "gggg"; } } thanks mofm Link to comment https://forums.phpfreaks.com/topic/101937-array-problem/ Share on other sites More sharing options...
p2grace Posted April 20, 2008 Share Posted April 20, 2008 You have $counter+1 should be $counter++ or $counter += 1 Link to comment https://forums.phpfreaks.com/topic/101937-array-problem/#findComment-521708 Share on other sites More sharing options...
mofm Posted April 20, 2008 Author Share Posted April 20, 2008 Great thanks that worked Link to comment https://forums.phpfreaks.com/topic/101937-array-problem/#findComment-521864 Share on other sites More sharing options...
p2grace Posted April 20, 2008 Share Posted April 20, 2008 Glad I could help Could you mark the topic as solved Thank you. Link to comment https://forums.phpfreaks.com/topic/101937-array-problem/#findComment-522054 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.