I have this code right here which shows the last 5 things my crawler has indexed on my index page.

PHP Code:
<?php

            
echo "
              <table width='60%' align='center'>
                      </tr>"
;
            
$result=mysql_query("select title, url from ".$mysql_table_prefix."links ORDER BY Link_id DESC LIMIT 5");
            while (
$row=mysql_fetch_row($result))
            echo 
"<tr class='class'>
            <td><center><a href='"
.$url_click."".($row[1])."".$url_end."' target='rel' title='View search results in new window'>".($row[0])."</a></center></td>
            </tr>"
;

?>
Sometimes I get text that pops up and takes up too much space due to the length of the article name. Can someone help me to make this filter out certain text such as " - Page 2 - article name " with the spaces included? That example is one that troubles me the most and mainly the only thing I need to filter. I am thinking some sort of replacement with regex because the numbers are dynamic and i would need match that exact example but with other numbers and remove it from the end of my page name. can someone help me achieve this. Also would doing this slow my page down at all having to do the replacement since more has to be done to display the text correctly? Any help is greatly appreciated.