Foreach loop with empty values

From: Date: Sat, 14 Jun 2003 03:49:24 +0000
Subject: Foreach loop with empty values
Groups: php.general 
Request: Send a blank email to php-general+get-151448@lists.php.net to get a copy of this message
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

« previous php.general (#151448) next »