Need help with 7-Segment Display

Thanks alot, I'm understanding it a whole lot more now. I don't know much about array so thats why its a little hard for me to understand. The one thing I want to know is how did you get it to read the 1 and 0. I figure you would have to add that in there some where or make it to read that. Is this how it read it:

if (patterns*[p]==1)*
I never use the == or any of the other. Thanks alot again for posting your code. It helped me understand more about programming the arduino.