Page 1 of 1

Using viewcode.php ... need to modify

Posted: Tue Apr 20, 2004 9:06 pm
by jmueller0823
We're using this script:
http://www.evilwalrus.com/viewcode.php?codeEx=262

A sample of our page output is here:
http://www.growthtrac.com/popular.php

The script derives the page descriptions from the page <title>.
So, a page description might look like this:
Articles for Christian Marriage, Growthtrac-A Surprising Key

Instead of this (preferred): A Surprising Key

QUESTION

How can I strip the repetitive <title> text from the page descriptions?
The text we want to eliminate is: Articles for Christian Marriage, Growthtrac-

Please be specific... I'm not an expert. Thanks.

Posted: Wed Apr 21, 2004 3:21 pm
by kettle_drum

Code: Select all

$string = "Articles for Christian Marriage, Growthtrac-A Surprising Key";
str_replace("Articles for Christian Marriage, Growthtrac-", "", $string);

Posted: Wed Apr 21, 2004 10:39 pm
by jmueller0823
Cool.

Got it. Thanks.