Jump to content

ryankentp

New Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

ryankentp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The solution was the put the number in curly braces like below: <?php echo $store->boxes->{1}->cost; echo $store->boxes->{2}->cost; ?>
  2. Nope. That didn't work: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$'' The box information isn't inside quantity. EDIT: Sorry, I mean isn't inside
  3. Hello, I am making a shopping cart that automatically decides what box to ship products ordered on my website in. The code connects to a mysql database and saves all the data, but I cannot find out how to echo the data, after it has been saved. I know this is the problematic code: <?php echo $store->boxes->1->cost; echo $store->boxes->2->cost; ?> I believe it doesn't work because of the numbers (1 and 2). If you know what I can do to fix it without even needing to look at my code, please respond. If not, reading more may help you. The source of the file is located at http://www.ryanpendleton.net/store.php The output of the file is located at http://www.ryanpendleton.net/output.php (I would have posted the code here, but I thought there was a little to much...) After looking at the output, it could tell it was returning the right thing, but I can not find out how to echo the price or size of the boxes. If you need me to clarify anything, don't hesitate to ask. Thanks in Advance, Ryan Pendleton
×
×
  • 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.