Syracuse University

By Subject

simplexml = new SimpleXMLElement($URL,NULL,true); } public function getAttr(){ $j=0; foreach($this->simplexml->subject as $ob) { $temp = $ob->name; $temp1 = $ob->url; $this->arrayobject[$j] = $temp; $this->arrayobject1[$j] = $temp1; $j = $j +1; } } public function showAttr(){ $count = count($this->arrayobject); echo ""; for($i=0;$i<$count;$i++) { if($i%2==0) { echo ""; echo ""; } echo " "; } echo ""; echo "
arrayobject1[$i]. "\">".$this->arrayobject[$i]."
"; } } $parsexmlob = new ParseXML(); $varurl = 'http://suabws.syr.edu:8080/wsSUABSubject/GetSubjectXML'; $parsexmlob->conntourl($varurl); $parsexmlob->getAttr(); $parsexmlob->showAttr(); ?>