I need to check if number in database is 1 or 0, and which number it is from beggining, for example, in my SQL column I have information like this:
0 0 0 1 0
And it has number 1 in it's SQL, and it's the fourth number from beginning, and I need to loop through all variables and check where is and what is this number, code something like this:
for($i = 0; $<5; $i++) {
while(//what to do here?) {
//Code
}
}
And, more examples:
if($Array[$i] == 1) { //Checks if the number is 1
echo "The number 1 in your column is at position:". $Variable .";
Shows where is the number from the beggining, in this case it is 4. So, thanks for help, sorry for my bad english.