Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
06-27-2013, 10:03 PM #1
- Join Date
- Jun 2013
- Thanked 0 Times in 0 Posts
How to remove part of a title name using php conversion tool?
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:
chop($pagetitleA, " - Docwiki");
<title><?php $this->$pagetitleA ?></title>
<title><?php echo str_replace("- Docwiki",'',$this->text('pagetitle')); ?></title>
06-28-2013, 12:15 PM #2
looks like you editing part of a function or class,
can you paste all of it?
There are 10 types of people on CodingForums,
Those who understand Binary and those who dont.
Get Cloud Hosting now from only£59 / month