Display xml rss feed using php

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

302231 Gifting Drinkware Flasks 1.8l Plastic Vacuum Flask BW0042
  • 18/8 Stainless Steel
  • 225ml Capacity
  • Twist Top
  • Hinged Metal Safety Lid Connector
38305_Thumb.png

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 .= “

$id
$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

i just answered this in your other post:
Answer Here.

Red :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service