Night Angel FRESH MEAT

Join date : 2010-03-10 Posts : 10
 | Subject: i cant get any thing to show up Tue Apr 13, 2010 10:30 am | |
| - Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Array 8 </title> </head> <body> <table> <?php $y=array('Baja ','Legacy ','Impreza ','Brat ','GL ','B9 ','XT ','SVX '); for($x=0;$x<=7;$x++){ echo "<tr><td>".$y."</td><td>".$y[$x]."</td></tr>"; } ?> </table> </body> </html>
|
|
Night Angel FRESH MEAT

Join date : 2010-03-10 Posts : 10
 | Subject: Re: i cant get any thing to show up Tue Apr 13, 2010 10:35 am | |
| here is the link
http://ito.auburncc.org/localuser/jrhodes/41310_1.php |
|
Old Amsterdam Bow Before Thy Master


Join date : 2010-03-04 Rank : Head Admin / Site Owner
Posts : 7269
 | Subject: Re: i cant get any thing to show up Tue Apr 13, 2010 10:37 am | |
| - Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> 41310_1.php </title> </head> <body> <!--author:shane nelson--> <table border="1"> <?php $x=array('Baja','Legacy','Impreza','Brat','GL','B9','XT','SVX'); for ($y=0;$y <= 7;$y++) { echo "<tr><td>".$y."</td><td>".$x[$y]."</td></tr>"; } ?> </table> </body> </html>
That's how I did mine. I think what's up with yours is that you have your variables switched. Instead of - Code:
echo "<tr><td>".$y."</td><td>".$y[$x]."</td></tr>";
You might want - Code:
echo "<tr><td>".$x."</td><td>".$y[$x]."</td></tr>";
Nevermind, you just told me you got it to work. _________________  |
|
Sponsored content
 | Subject: Re: i cant get any thing to show up  | |
| |
|