I have a foreach loop in a while loop that retrieves information from my database. The foreach loop works fine if there is data in the database for that loop. But if nothing is found in the database, I get a "Invalid argument supplied" error.

Can anyone suggest a fix for this? The foreach loop is a standard foreach.

Code
foreach($pid as $netPid){
        echo "$netPid<br>";
}

Chris


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



Reply via email to