The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Need a little help writing an if statement to check if a certain file with the following extension is present.
PHP Code:
|
|
#2
|
|||
|
|||
|
<a href="http://us4.php.net/manual/en/function.readdir.php" target="_blank">http://us4.php.net/manual/en/function.readdir.php</a> ?
|
|
#3
|
||||
|
||||
|
what does !== mean ?
|
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
|||
|
|||
|
It means that if the variables are not cast as the same type they will eval as not equal.
|
|
#6
|
|||
|
|||
|
Quote:
== compares string representations; != is the inverse === compares the exact values depending on the type; !== is the inverse For example: PHP Code:
|
|
#7
|
||||
|
||||
|
Thanks filburt. Readdir was exactly what I was looking for.
|
|
#8
|
||||
|
||||
|
can i just ask what's the difference between != and !==?
nevermind it appears to be the same as == and === :-S |
|
#9
|
||||
|
||||
|
so wait...
== is used for numerics and === is used for strings. woops^.^ |
|
#10
|
|||
|
|||
|
Quote:
In filburt's example PHP Code:
123 is identical to "123" // is false, the quotations indicate the 123 as a string. I could be wrong though. I'm still learning. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|