for loop without same $i digits?


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I want to use for loop to echo all number from 000 to 999
Quotefor($i=0;$i<1000;$i++)
{
echo "$i
";
}

My question is how can I skip the values that have the the same digits from displaying more than once ?

e.g 1)
001 displayed
and 101, 100 should not be displayed in the page anymore since it is the same value with different permutation

e.g 2)
127 displayed
and 217, 712, 172 and etc with the same digits should not be displayed.

Please advise how can I accomplish the above. Thanks

No comments posted yet

Your Answer:

Login to answer
146 Like 35 Dislike
Previous forums Next forums
Other forums

Create PHP table grid help, please
I have a MySQL database setup, now it's time for the table (gridview) design in php. Here's the prob

Match stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

mysql UPDATE request not working and driving me crazy!!!
Hi,

I have been stuck on this for ages.

Quite simply I am trying to update my database

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

Table colours fail when extra row added
Hey Gurus,

I got a weird problem with formating the colour of a table made in php. Everything

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?

Thanks

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash