0
$tag    = <some html tag>;
$a  = new DOMDocument();
$a->loadHTML($tag);

im newly using DOMDocument php i have read the documentation but still didn't understand why loadHTML() returning 1, can someone explain it to me?? Thank you in advance

arar
  • 1
  • 1
  • It's not returning `1`, it's returning `true`. But if you echo that, it prints `1`. See the linked question for how to print `true` or `false` instead. – Barmar Jun 17 '22 at 02:03
  • What were you expecting it to return instead? – Barmar Jun 17 '22 at 02:06

0 Answers0