[snip] > $arrayUser[1] = 'bob'; > $arrayUser[2] = 'cindy'; > $arrayUser[1] = 'mark'; > $countUser = count($arrayUser); > for($i = 0; $i < $countUser; $i++){ > $sql = "SELECT email FROM table WHERE id = '" . $arrayUser[$i] ."' "; > }
Is this method faster than just using IN and implode()? ie, "WHERE id IN ( '" . implode() . "' )" [/snip] No, because it requires the query be run more than once, but you may not get the desired results. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php