I’m using a rss feed to display products.
I’m pretty new to php.
I need to be able to display 3 different categories
. sports brands
. clothing
. gifting
BW0042
- 18/8 Stainless Steel
- 225ml Capacity
- Twist Top
- Hinged Metal Safety Lid Connector
I’m using the following script to extract info
I’ve only ever worked sql statemtents.
$html = “”;
$url = “http://www.kevro.co.za/rss/[email protected]&password=guykaimowitz&feed=product”;
$xml = simplexml_load_file($url);
for($i = 0; $i < 5; $i++) {
$id = $xml->product[$i]->id;
$categorygroup = $xml->product[$i]->categorygroup;
$category = $xml->product[$i]->category;
$group = $xml->product[$i]->group;
$name = $xml->product[$i]->name;
$code = $xml->product[$i]->code;
$description = $xml->product[$i]->description;
$thumb = $xml->product[$i]->thumb;
$html .= “
$categorygroup
$category
$group
$name
$code
$description
$thumb
}
echo $html;
How can I display $categorygroup with the value gifting only
or
How can I display $categorygroup with the value clothing only
or
How can I display $categorygroup with the value sports brands only