My goal is to retrieve info from a document. An example would be XML or HTML. I have come up with a few ideas; however, they all seem somewhat uneffecient.
Then the script gets what's between the <title> and <body> tags. I thought I could use something like below, but I decided against it (if i can get better).Code:<html> <head> <title>Document name</title> </head> <body> some contents </body> </html>
$string = "html";
$title_pre = explode("<title>", $string);
$title = explode('</title>', $title_pre['1']);
$title = $title['0'];