This is sort of related to an earlier question...I am debating the structure of the database and how best to display this data.
I have a string:
00011000011010000010000000000001001101100005
The zeros and ones above each correspond to a text comment...ie if the first is a zero, my text is NULL, but if it is a 1, my text is "Blue".
Each of the 43 digits above are NULL if NO (0)...and a different text comment if YES (1). The "5" at the end signifies the END of the string.
I have stored this string, and with some help from the kind folks here I can display the appropriate text per variable (all 43 of em). But thinking on it further, I also need to be able to create a table where I can SORT on each variable as well.
So I am thinking I can have a field for each character...and treat it as a TRUE or FALSE field (ie data_1 = 0 (False), data_2=1 (true)...etc).
That would allow me to simply query the information, drop it into a table, and easily sort based off the "hard" data in the table (instead of trying to switch/case each record each time I sort.
The question is this - what command do I use to break out EACH number and assign it a variable for input into a database?
Using the above example of: 00011000011010000010000000000001001101100005
$data_1 = 0
$data_2 = 0
$data_3 = 0
$data_4 = 1
$data_5 = 1
etc...
How do I break this thing apart!