I am still a novice with PHP but I feel like I am making this task more complicated then it needs to be.
I recently acquired a tool (dumpHTML) that is coded in php which allows me to convert mediawiki content into html. I have been trying to make minor changes to it so it looks more clean after i convert to html. All the titles of my pages end with " - Docwiki" (Example: "Hole Mounts - Docwiki") and i do not like that. I want to write something that deletes the " - Docwiki" at the end of every title once i use the conversion tool.
Here is the original code line:
<title><?php $this->text('pagetitle') ?></title>
Here is what I have attempted and i get a fatal error when i try to run the tool:
I also had a suggestion to try this and it didn't work:
chop($pagetitleA, " - Docwiki");
<title><?php $this->$pagetitleA ?></title>
Is there something I am missing or doing completely wrong? Any help or suggestions will be greatly appreciated!
<title><?php echo str_replace("- Docwiki",'',$this->text('pagetitle')); ?></title>