Jump to content

Please help me understand


bumba000

Recommended Posts

Hi Thanks for reading,

 

I was recently here with a problem and got it worked out. Well, got it worked around. I'm trying to figure out what caused the problem but I've been looking over the same code for HOURS and still don't feel any closer to an answer.

 

For starters if you could please explain what "totals" is doing in the code below. By this I mean, what is it's job, in what way does it relate to $orders?

 

<?php

  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {

    echo '          <tr>' . "\n" .

         '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" .

         '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .

         '          </tr>' . "\n";

  }

?>

 

The page that this exists on does include several other pages. The most relevant to this problem would likely be order.php. order.php

 

Thanks in advance,

                        John

Link to comment
https://forums.phpfreaks.com/topic/105206-please-help-me-understand/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.