Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001072

[PHP-DB] (preg_match ? From: phpnet <email protected>
Date: 07/26/01

What's wrong with this use of preg_match?

$search = "TheName"
$data = "TheName,TheAddress,ThePhone"

if (preg_match('"/\b'.$search.'\b/i"', $data))
{
echo "True<br>";
}
else
{
echo "False<br>";
}
I am trying to see if the search name matches exactly a name in the $data.
Thanks
Dave

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>