Horje

If Match Some Word

For this, you will need Regular Expressions and the preg_match function. Something like:

index.php
Example: PHP
<?php
$data = 'bad';
if(preg_match('(bad|naughty)', $data) === 1) 
{
echo 'Yes';    
} else {
echo 'No';    
}
?>

Output should be:

If Match Some Word




Type:
php
Category:
Web Tutorial
Sub Category:
PHP String Tutorial
Uploaded by:
Admin