snipt

Ctrl+h for KB shortcuts

PHP

Show attribute of simplexml object

1
2
3
4
5
6
   1.
      Print Atrributes of a Xml object through simplexml
   2.
       
   3.
      $results->attributes()->q; (if q is the attribute)
https://snipt.net/embed/aff1927616d8617d2eb77471cf17aa9b/
https://snipt.net/raw/aff1927616d8617d2eb77471cf17aa9b/
aff1927616d8617d2eb77471cf17aa9b
php
PHP
6
2016-09-29T00:38:20
True
False
False
/api/public/snipt/3482/
show-attribute-of-simplexml-object
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x"> 1.</span> </span><span id="L-2"><a name="L-2"></a><span class="x"> Print Atrributes of a Xml object through simplexml</span> </span><span id="L-3"><a name="L-3"></a><span class="x"> 2.</span> </span><span id="L-4"><a name="L-4"></a><span class="x"> </span> </span><span id="L-5"><a name="L-5"></a><span class="x"> 3.</span> </span><span id="L-6"><a name="L-6"></a><span class="x"> $results-&gt;attributes()-&gt;q; (if q is the attribute)</span> </span></pre></div> </td></tr></table>
php, simplexml
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.