[PHP] php + mysql: binary arrays

2005-03-29 Thread Robert S
I am writing a contact manager in php/mysql. I'd like to use a binary array as an efficient way to store information for groups that each contact belongs to eg: Field: 'group': 001010 means that the contact belongs to the second and fourth group. If the array is of type Byte, it should be able

RE: [PHP] php + mysql: binary arrays

2005-03-29 Thread YaronKh
[mailto:[EMAIL PROTECTED] On Behalf Of Robert S Sent: Tuesday, March 29, 2005 12:35 PM To: php-general@lists.php.net Subject: [PHP] php + mysql: binary arrays I am writing a contact manager in php/mysql. I'd like to use a binary array as an efficient way to store information for groups that each contact

Re: [PHP] php + mysql: binary arrays

2005-03-29 Thread Colin Ross
oops.. how bout if i send it to the group too... http://us4.php.net/manual/en/function.preg-split.php example for you: $groups = '0101000100101010001110010100111'; $groups_array = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($groups_array); $groups_as_string =