Finding numerical values in a string

From: Date: Thu, 31 Aug 2000 10:16:16 +0000
Subject: Finding numerical values in a string
Groups: php.general 
Request: Send a blank email to php-general+get-14556@lists.php.net to get a copy of this message
Hey, I was wondering if anyone knew how to detect a numerical value at the end of a string lets say I got all these product id's which are unique, some are blank but still need a value so I have used: notavail1, notavail2, notavail3 etc..... Now in a if statement I need to find any of these like so.. if ( $Pid == "notavail<num value>" ) { ... } In Mysql you have the LIKE clause, but I was wondering how I would detect if the string is like: notavail(num), I hope this makes sense to you. Please make sure you reply to this message privately as well as the list as I'm at home and not subsribed from here. Any help always appreciated. Joseph Blythe

« previous php.general (#14556) next »