Jump to content

Is there a function for this?


ballhogjoni

Recommended Posts

You'd have to set up reading the file and then doing matches with regex.  Something like this:

 

<?php
$text = "READ YOUR HTML IN TO THIS STRING";
preg_match("/\<title\>(.*)\<\/title\>/", $text, $matches); 
echo $matches[1];
?>

 

Aslong as all your HTML is in $text it'll output whatever's in between <title> and </title>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.