Hello, OK I think I understand what you were trying to do now.
At the top of your PHP file just under the <?php can you paste this line of code:
This will print any errors that occur during the script in the browser as you test the script.
I still think there is an error in the logic... I would change your for loop to this:
> for($i=0; $i<10; $i++)
if($rowcount > $i)
echo('filename: '.$properties[$i]['filename'].'<br />');
//do something else
The only thing I have changed is: $rowcount > $i.
What you were doing before is cycling through your results, then checking if $rowcount was LESS than or equal to the current value of $i. This wouldn't work and is probably the reason you are getting the output of just "filename:"
I shall explain why now:
Let's say for an example that your MySQL query returns 5 rows.
$rowcount therefore = 5.
then you start at $i = 0
$i =0 , $rowcount <= $i, (5 <= 0) ... FALSE...
$i =1 , $rowcount <= $i, (5 <= 1) ... FALSE...
$i =2 , $rowcount <= $i, (5 <= 2) ... FALSE...
$i = 5 , $rowcount <= $i, (5 <= 5) ... TRUE... So now we have one that is true. But as there are only 5 rows returned there will be NO value for $properties['filename'], as PHP arrays begin from 0 the $properties is actually the 6th element, hence no result, hence "filename: " So from then on $i =6 to $i=9 is the same result.
This I think should solve your issue.