Hi,
I have a problem with a variable which contains an array of info. The problem is that it's inside a while loop and when it gets to the second item it doesn't work.
I don't know how to explain it so excuse my poor explanation. I think if you see the code it will be more clear.
The variable $size is where the problem lies I think.
The first time it shows the width and the height. But after that it doesn't show the info.
$sql = "SELECT * FROM articles ORDER BY dateposted DESC;";
$result = mysql_query($sql);
$file = "gfx/flyers/";
while($row = mysql_fetch_assoc($result)) {
$sql_cat = "SELECT cat FROM categories WHERE id=".$row['cat_id'].";";
$category = mysql_query($sql_cat);
$category = mysql_fetch_assoc($category);
$image = $row['image'];
$file .= $image;
$size = getimagesize($file);
echo '<div class="article" id="art'.$row['id'].'">
<div class="generaltitle" >
<div class="title">
<h3><span>'.$category['cat'].': </span>'.$row['subject'].'</h3>
</div>
</div>
<div class="details">
<b>Posted by '.$row['postedby'].' on '.date("D jS F Y", strtotime($row['dateposted'])).'</b>
</div>
<div class="body">
<div class="topic">
<a href="javascript:popUp(\'pop.php?img='.$image.'\', '.$size[0].', '.$size[1].')"><img src="gfx/flyers/'.$row['imagethmb'].'"></a>
</div>
<div class="intro">
'.$row['body'].'
</div>
</div>
</div>';
}