Рет қаралды 719
Learning about loops in programming opens up so many avenues to new programmers all of a sudden! It's hard to know where to begin to start to apply the new structure.
Well here's one example. take a for loop to iterate through the generation of a number of div containers of random sizes, positions and background colors.
In this tutorial I show you how to use the for loop, randomize the different variables - and even randomize hexdecimal colors to get a kaleidoscope effect on your browser. The coup de grace is to use the meta refresh tag to have the user's browser refresh every second to get the disco lights flashing. Who said php can't be creative!