fork download
  1. <?php
  2.  
  3. $html = '<a href="uploads/tutorial1.pdf">tutorial1.pdf</a>';
  4.  
  5. $xml = simplexml_load_string($html);
  6.  
  7. echo $xml . PHP_EOL;
  8. echo $xml['href'];
Success #stdin #stdout 0s 52488KB
stdin
Standard input is empty
stdout
tutorial1.pdf
uploads/tutorial1.pdf