Hi,

Getting some strange results:

List: My Shopping List

Food group name is Fruits and Vegetables

Food group name is Grains

Item
Quantity
Pomegranate
2
Carrots
1 pound

Food group name is Candy

Item
Quantity
Couscous
6 ounces

Item
Quantity
Crunchie Bar
1 gross


I'll keep working it, however your skill is invited.

CK
On Feb 7, 2007, at 10:52 AM, Patrick H. Lauke wrote:

Quoting CK <[EMAIL PROTECTED]>:

The following example of using simpleXML to output XML data is strong.
However, would some standards savvy PHP maven guide in outputting the
list in the proper format:

Just having a cursory glance, I'd say that what you want in that central loop is actually a table, not a list ... it's tabular data.

foreach ($xml->foodGroup as $foodGroup){
  echo "<h2>Food group name is " . $foodGroup->groupName . "</h2>";

  echo "<table>
  <thead>
  <tr><th scope="col">Item</th><th scope="col">Quantity</th></tr>
  </thead>
  <tbody>";

  foreach ($foodGroup->item as $foodItem){
    echo "<tr><th scope="row">" . $foodItem->name . "</th>";
    echo "<td>" . $foodItem->howMuch . "</td></tr>";
  }

  echo "</tbody>";

}

P
--
Patrick H. Lauke
__________________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com
__________________________________________________________
Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
__________________________________________________________


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to