Mike Davies wrote:
> Hello,
> 
> This is my first post to this list and I am a novice at php coding. I
> can generally follow the code but not good at writing from scratch.
> 
> 
> I have recently been trying to add to a website which was originally
> developed by someone else and is written in php and mysql. I am trying
> to add a 'news' section to the site. This would be similar to an
> existing 'projects' section so, rather than write it completely from
> scratch I copied the php and the database tables from the 'project'
> section and renamed 'project' to 'news'.
> 
> 
> This is working well except for one thing – I get the following error
> messages when looking at the detailed news item. This code does not
> produce this warning in the project section which is using the same php
> code
> 
> 
> Warning: reset() [function.reset]: Passed variable is not an array or
> object in /home/b23aadf/public_html/news/details.php on line 72
> 
> Warning: Variable passed to each() is not an array or object
> in /home/b23aadf/public_html/news/details.php on line 73
> 
> 
> The relevant lines are :
> 

put a var_dump($thumbarray); right here and see what $thumbarray is

> 
> 72 reset($thumbsarray);
> 
> 73 while (list($key, $value) = each($thumbsarray)) {
> 
> The site is at www.aadf.co.uk and select 'News'.
> 
> Is anyone able to help resolve this? If you let me know what further
> information you require I can provide it.
> 
> 
> Mike Davies
> 


-- 
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to