Coding hints?

From: Date: Wed, 08 Nov 2000 02:33:48 +0000
Subject: Coding hints?
Groups: php.general 
Request: Send a blank email to php-general+get-24240@lists.php.net to get a copy of this message
Hi Guys, Sorry to post with something trivial, but I can't seem to find anything on this: I'm modifying some code to recognize a certain filename scheme, but I've run across something I've never seen before. Here's the code: $arr = file('sb' .(int)$sb. '.src'); The filename it's looking for is in the form sbN.src (where N = an integer). The $sb variable is an integer passed via the url. What I don't get is the (int)$sb part - what is the (int) doing there? Is this some sort of funky regex? Or is it casting the $sb string into an int? I must admit, I'm at a loss . . . What I'm ultimately trying to do is to get the code to recognize files where $sb is not only a number, but is also a number with a single char appended to it such as [a-z]. Can't this be done with a straightforward regex? Any pointers would be greatly appreciated . . . =0)

« previous php.general (#24240) next »