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

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

Error querying database.
I get the above error when trying to insert some values to a datatable.
Here's the code :

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

fwrite error
Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$error

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

LOOPing Problem
Hello All!

The following code loops through the data and displays the data accordingly. My p

how to easy edit text, with box? Help.
Hi.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy

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