Jump to content

Little search and replace trouble


strago

Recommended Posts

$file=str_replace("{title2}",$line['title'],$file);
$file['title2'] = trim(preg_replace('/[^\w\d]+/', ' ', $file['title2']));
$file['title2'] = str_replace(' ', '-', $file['title2']);

 

The first line does what it should do, have {title2} in the template generate the page title. The next two lines don't do the replacing.

Link to comment
https://forums.phpfreaks.com/topic/214582-little-search-and-replace-trouble/
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.