php loop: repeat just once -


How can I get a php loop to print:

1 1 2 2 3 3 250 way to 250 So basically calculate from 1 - 250, but print each number twice?

 for  ($ i = 1; $ i & lt; = 250; $ i ++) {echo "$ i"; Repeat "$ i"; }  

Comments

Popular posts from this blog

asp.net mvc - Dynamically Generated Ajax.BeginForm -

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

sockets - TCP programming with .NET -