Builld the string in a variables by concatenating them (using while), and
then put the string in the array. It should be something like this:
while($modyear <= $curyear)
{
echo "<option>".$modyear.;
$options = $options . "<option>$modyear" ;
$modyear++;
}
And then in the array, do:
$make = array('Make','12','keyword','1:30','select', $temp_option ,'text');
Hope that helps.
Reuben D. Budiardja
At 06:35 PM 3/31/01 -0600, Kenneth R Zink II wrote:
>I'm trying to figure out how to do a WHILE inside of an array.
>
>Here is the while statement.
>
>$modyear = "1982";
>$curyear = date("Y");
>$curyear = $curyear + 1;
>
>while($modyear <= $curyear){
>echo "<option>".$modyear.;
>$modyear++;
>}
>
>The array I want to use the WHILE in, looks like this. The X is where I
>want to insert the WHILE.
>
>'year' => array('Year','12','keyword','1:30','select','X','text'),
>
>Here is what a functioning array statment in my script looks like for
>referance.
>
>'make' =>
>array('Make','12','keyword','1:30','select','<option>Chevrolet<option>GMC<op
>tion>Isuzu<option>Oldsmobile','text'),
>
>Can someone please give me some pointers. =)
>
>Thanks.
>
>
>Kenneth R Zink II [EMAIL PROTECTED] ICQ# 5095094
>'87 GMC S-15 Ext. Cab (Hurricane) ...BBC 524 being built !!!
>http://www.s-series.org/htm/windstorm/project-windstorm.htm
>'85 Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI !!!
>http://www.s-series.org/htm/firestorm/firestorm.htm
>'84 Oldsmobile Delta 88 Delta 88 Royal Brougham.
>Racing by the grace of God!!!
>
>
>--
>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]
Reuben D. Budiardja
Web Database Application Programmer / Analyst
Devcorps, ITS
Goshen College, IN 46526
--
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]