am working on a website project in which i fetch array from my database and use foreach statement to output its contents. I want use php script to count how many items are in the array and assign number position to each item so that if the number position of the first item is an odd number i will apply css float:left style to it but if its even number it will float:right
any help please??. thank you.
See Question&Answers more detail:os