note 45119 deleted from function.preg-match by aidan
| From: | aidan@php.net | Date: | Thu, 26 Aug 2004 22:13:04 +0000 |
| Subject: | note 45119 deleted from function.preg-match by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75359@lists.php.net to get a copy of this message | ||
Note Submitter: n0spm-kneufeld at usa dot net
----
I too was trying to use preg_match in a switch and it wasn't working. Based on another comment
here I tried:
<?
switch ($var) {
case preg_match('/port/',$var) > 0:
# etc...
break;
}
?>
ie: add '> 0' to check for a match.