Works like a charm!! I was trying something out with having a variable go completely out of the functions & loops and print the "not found" message, but I wasn't hitting it. You did! // ^^^--- now tested ;) On 10/6/06 1:52 PM, "Jochem Maas" <jochem@xxxxxxxxxxxxx> wrote: > $msg = 'cannot open database!'; > if ($db = dbase_open("osm.dbf", 0)) { > $msg = 'database contains no records!'; > if ($record_numbers = dbase_numrecords($db)) { > $msg = 'number not found'; > for ($i = 1; $i <= $record_numbers; $row = > dbase_get_record_with_names($db, $i),$i++) > if ($row['PHONE'] == $thekey) { $msg = 'number found'; break; } > } > } > echo $msg; > // ^^^--- untested > Rahul S. Johari Supervisor, Internet & Administration Informed Marketing Services Inc. 500 Federal Street, Suite 201 Troy NY 12180 Tel: (518) 687-6700 x154 Fax: (518) 687-6799 Email: rahul@xxxxxxxxxxxxxxxxxxxx http://www.informed-sources.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php