Jump to content

strip


shage

Recommended Posts

are you trying to get the page's title I use this method

<?php
$url = $_GET['URL'];
if($content=file_get_contents($url)){
$title_start = strpos($content,"<title>");
$title_length = strpos($content,"</title>")-$title_start;
$title = substr($content,$title_start,$title_length); //This should be the title
$title = str_replace("</title>","",$title);
$title = str_replace("<title>","",$title);
echo $title;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/60678-strip/#findComment-301867
Share on other sites

$post_title = get_the_title();

That code will give me The Title

 

I need it to give me the_title

 

i have figured that

str_replace(" ", "_", strtolower(strval(trim(INF))));

 

would do it but cant figure out who to use it in the code or if thats even right

You're right. But you shouldn't need the strval.

Link to comment
https://forums.phpfreaks.com/topic/60678-strip/#findComment-301889
Share on other sites

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.