Jump to content

nade93

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by nade93

  1. $xml = simplexml_load_file('http://cachepricefeeds.williamhill.com/openbet_cdn?action=template&template=getHierarchyByMarketType&classId=1&marketSort=--&filterBIR=Y'); $x = $xml->response->williamhill->class->type; foreach ($x as $p=>$t): // get the type for drill down to market ?> <div id='feedhead'><? echo $t['name']; ?></div> <? foreach ($t as $m): // get the attributes for the market //-------- GET THE DATES IN ORDER $d = explode('-', $m['date']); $date = $d[2].'/'.$d[1].'/'.$d[0]; echo $m['url']; endforeach; endforeach;
  2. thanks for the replay however When I implement that no results (inluding the header) pull at all
  3. hi all I am trying to get one printed result from an attribute that is pulling from a nested array I am pulling a top layer for the header then placing the items under the header foreach ($x as $p=>$t): // get the type for drill down to market ?> <div id='feedhead'><? echo $t['name']; ?></div> <? foreach ($t as $m): so the $m['url'] is the thing i am wanting to group by as is it pulling things that are duplicating. so if did below for example echo $m['url'].'<br>'; would output as http://google.com http://google.com http://google.com http://google.com however would want just the single output from the loop http://google.com how do i go about this? thanks in advance
  4. Hi all I am hoping you can help. I am looking to pull the feed and parse the follow. I am wanting to get both the attributes and the cildren of the market branch of xml. Can someone help me out please? <oxip version="7.1" created="2014-03-21 19:19:20" lastMsgId="" requestTime="0.1686"> <response request="getHierarchyByMarketType" code="001" message="success" debug=""> <williamhill> <class id="436" name="Football - Virtual" maxRepDate="2014-03-21" maxRepTime="00:56:39"> <type id="8398" name="Victoria Stadium" url="http://sports.williamhill.com/bet/betting/t/8398" lastUpdateDate="2014-03-10" lastUpdateTime="23:31:52"> <market id="152656333" name=" Czech Republic v Poland - Match Betting" url="http://sports.williamhill.com/bet/en-gb/betting/e/5778703/%2dCzech%2dRepublic%2dv%2dPoland"date="2014-03-21" time="19:20:00" betTillDate="2014-03-21" betTillTime="19:20:00" lastUpdateDate="2014-03-21" lastUpdateTime="00:53:59"> <participant name="Poland" id="534674127" odds="2/1" oddsDecimal="3.00" lastUpdateDate="2014-03-21" lastUpdateTime="00:53:59" handicap=""/> <participant name="Draw" id="534674126" odds="12/5" oddsDecimal="3.40" lastUpdateDate="2014-03-21" lastUpdateTime="00:53:59" handicap=""/> <participant name="Czech Republic" id="534674125" odds="5/4" oddsDecimal="2.25" lastUpdateDate="2014-03-21" lastUpdateTime="00:53:59" handicap=""/> </market>
×
×
  • 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.