Re: What does || mean ?
| From: | Chris Blake | Date: | Thu, 17 Apr 2003 08:17:17 +0000 |
| Subject: | Re: What does || mean ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144242@lists.php.net to get a copy of this message | ||
So, if I wanted to say, if $file equals "." or $file equals".." or
$file=is not a file(i.e. it`s a directory)
then I could use this :
if($file=='.'||$file=='..'||is_file(!$file))
then do something.
Basically, I have a loop that scans directories only for the presence of
files, not directories and "." or ".."....it then puts their
values($file) into a drop down in HTML.
I`m just a bit confuzzed by the "OR is not a file" syntax
Thanks
Chris
On Thu, 2003-04-17 at 10:07, Alexandru Coseru wrote:
>
> it's an OR .
> ie: meaning if file == '.' OR $file==".." then....
>
>
> Alex
>
> ----- Original Message -----
> From: "Chris Blake" <cblake@pbpc.co.za>
> To: "Php-General" <php-general@lists.php.net>
> Sent: Thursday, April 17, 2003 11:03 AM
> Subject: [PHP] What does || mean ?
>
>
> > Greetings learned PHP(eople);
> >
> > What does the use of "||" in the following instance mean ?
> > ------------------------------------
> > if($file=='.'||$file=='..')
> > echo $file;
> > ------------------------------------
> >
> > Is it : if the file is equal to "." AND/OR/NOT equal to ".."
> >
> > Thanks
> >
> >
> > --
> > Chris Blake
> > Office : (011) 782-0840
> > Cell : 083 985 0379
> > A man without a woman is like a statue without pigeons.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
A man without a woman is like a statue without pigeons.