So I used file_get_contents to download a page. I extracted a chunk of data I want, but I want to get rid of the html around the value that I’m looking for.
<title>Sewer Waste</title>
How would I pull “Sewer Waste” out of that code using preg_match_all.
if(preg_match_all( "/<title>/^[a-zA-Z][\\w\\s]*/<\\/title>/i", $card, $gtdump))
{
$gt = $gtdump[0][0];
}
else
{
echo 'Cannot be retrieved.';
}
If I remove the <title></title> from the search, I will return many results. There must be a simpler way to extract just the text inbetween the <title> tag’s?