Jump to content

Array problem


mofm

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.