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

Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

Require select-option functionality in Module Pool Programming
Hi Gurus,

I am doing a development by Module Pool on Warehouse Management. For that devel

Turning Data into URLs?
This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don'

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes th

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

PHP & Java
Hello,

can PHP code be used inside java code?

Code: <SCRIPT LANGUAGE="Java

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