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

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on diff

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

mysql UNION | warning mysql_fetch_array !!
Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `div

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

MySQL-PHP Query Results Help
Hello all. I'm hoping to be able to get some help in solving a problem with query/rowcount output. I

subtract 1 from value entered in text field
Hi

How do I subtract 1 from the vaue entered into a text field?

Thanks

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

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