you can do:

echo ${"banner$RandBanner"}

this will create a variable for you.

However, I think you should be using an array. Things are getting much
faster and better.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Ray Iftikhar [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 4:03 PM
To: Php-General List
Subject: [PHP] displaying string combinations


hello,
    I have a bunch of "Banner" strings (ie. $banner1, $banner2, $banner3,
$banner4). I have another set of "random" strings that randomly generate a
value 1-4 ($RandBanner1, $RandBanner2, $RandBanner3,$RandBanner4). Now I
want to display $banner1-4 randomly. I plan on doing this by:
print "$banner".$RandBanner1;
but that doesnt seem to work...Anyone got any other suggestions?
Any help is greatly appricaited.
Thanks in advance,
Ray


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to