Michael, I like your idea, and had I designed this site, I would have
the bitmask simmilar to what you suggest. However, I'm a contractor
modding an existing/legacy site. Basically the way they have it, is that
each user has a field in the db that is simply a string/mask of which
books a person
At 10:18 06.11.2002, Daevid Vincent said:
[snip]
doesn't lend itself nicely to expansion, but may be my only way. I just
have a gut feeling that it can be automated somehow. To turn 1,3,4 into
10110 seems like there is some 'math' there that can work. I also
So given the example below, 10110
means that the person can view books 1, 3, and 4, but not 2 or 5. dig?
Explain that to me... I know binary, but I can't see how that equates to
1, 3, and 4.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi John,
So given the example below, 10110
means that the person can view books 1, 3, and 4,
but not 2 or 5. dig?
Explain that to me... I know binary, but I can't see
how that equates to 1, 3, and 4.
Because you know binary :-)
The above is a series of yes/no flags, not a binary
Hi John,
So given the example below, 10110
means that the person can view books 1, 3, and 4,
but not 2 or 5. dig?
Explain that to me... I know binary, but I can't see
how that equates to 1, 3, and 4.
Because you know binary :-)
The above is a series of yes/no flags, not a
To: 'Jon Haworth'; [EMAIL PROTECTED]
Subject: RE: [PHP] How do I convert an array into a mask?
Hi John,
So given the example below, 10110
means that the person can view books 1, 3, and 4,
but not 2 or 5. dig?
Explain that to me... I know binary, but I can't see
how
That's the EASY part John!
The hard part is converting the array (which was a checkbox array from
a
form submission) into the binary string (as per the original post)
Here's the deal. Given an array such that:
$purchitem[0] = 1; //purchased book #1 checkbox enabled
$purchitem[1] = 3;
($revchars) ) { $revString .=
$Val; }
return $revString;
}
-Original Message-
From: Ernest E Vogelsinger [mailto:ernest;vogelsinger.at]
Sent: Wednesday, November 06, 2002 1:28 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] How do I convert an array into a mask?
At 10:18
Oooh! I think you're on to something there. Nice!
Hey, what's the symbol for? I see in the manual the is a
reference (like a pointer in C I assume), but I can't find the
explained.
if($purchitem[$y] == $x)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Oooh! I think you're on to something there. Nice!
Hey, what's the symbol for? I see in the manual the is a
reference (like a pointer in C I assume), but I can't find the
explained.
if($purchitem[$y] == $x)
It'll suppress warnings and errors. If the $purchitem does not have a
key 4
At 13:43 06.11.2002, Daevid Vincent said:
[snip]
Ernest, close but you have it reversed for my needs (i.e. true binary
form). Notice that my LSB is to the left, not right.
Ah, ic, you want a string like 1100101 - that's easy :)
Note that I do _not_ pass
Hi,
Wednesday, November 6, 2002, 2:56:33 PM, you wrote:
DV Does anyone know of a nice efficient way to convert an array of values
DV into a mask...
DV Here's the deal. Given an array such that:
DV $purchitem[0] = 1;
DV $purchitem[1] = 3;
DV $purchitem[2] = 4;
DV I want to end up with a
-Original Message-
From: Daevid Vincent [mailto:daevid;daevid.com]
Sent: 06 November 2002 12:23
To: [EMAIL PROTECTED]
That's the EASY part John!
The hard part is converting the array (which was a checkbox
array from a
form submission) into the binary string (as per the
Does anyone know of a nice efficient way to convert an array of values
into a mask...
Here's the deal. Given an array such that:
$purchitem[0] = 1;
$purchitem[1] = 3;
$purchitem[2] = 4;
I want to end up with a variable like this:
$mask = 10110;
Additionally, my theory is that then the person
Why don't you ask Jim Carrey ???
He knew more that whoever here about The MASK !!!
Good luck.
- Original Message -
From: Daevid Vincent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 06, 2002 3:56 PM
Subject: [PHP] How do I convert an array into a mask?
Does anyone
On Tue, 5 Nov 2002 20:56:33 -0800, you wrote:
Does anyone know of a nice efficient way to convert an array of values
into a mask...
I'm going to assume that you mean a bitmask. I'm not exactly sure
what you're trying to accomplish, so I may be off base here, but let
me describe how I'm using
16 matches
Mail list logo