Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-10-2005, 10:56 PM   PM User | #1
shopwithdan.com
New Coder

 
Join Date: Apr 2005
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
shopwithdan.com is an unknown quantity at this point
number and letter generator

Hi,
I have to short snippets that create lists of 3 # combos/3 letter combos,
I want to allow users to pick if the combos should be followed by .com, .net, etc. I tried to do it myself but the result is always ".com543"
http://droplister.com/tools/3char.html

Can someone help me add a schalar or something that can be defined like $tld=$_POST["tld"];
Can you help?

Random #s
Code:
<?
/*
1 - 999
*/
$ini = 0;
$fin = 999;
for($i=$ini; $i<=$fin; $i++)
{
printf( "%s<br />\r\n", str_pad($i, 3, "0", STR_PAD_LEFT) );
}
?>
Random letters
Code:
<?

$letra = array();
for($i=97; $i<=122; $i++)
{
$letra[] = chr($i);
}

foreach($letra AS $a) {
foreach($letra AS $b) {
foreach($letra AS $c) {
echo "$a$b$c<br />\r\n";

}
}
}
?>
shopwithdan.com is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:44 PM.


Advertisement
Log in to turn off these ads.