Jump to content

jonrick

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jonrick's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm more or less trying to get $items[$i] to equal $item_nameX with X being $i. If you look at the code you should be able to understand what I'm trying to do. <?PHP $item_name1 = "Armor"; $item_name2 = "Pants"; $item_name3 = "Gloves"; $item_name4 = "Helmet"; $item_name5 = "Shield"; $num_cart = 5 +1; for ($i=1; $i < $num_cart; $i++) { [color=red]/********************************* All I need this line of code todo is for $items[$i] = $item_name$i *********************************/ [b]$items[$i] = `echo \$item_name$i`;[/b][/color] } $num = count($items); $num = $num -1; for ($i=1; $i < $num_cart; $i++) { echo $items[$i]; echo '<br>'; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.