Knowledge Base Navigation

Articles: 51 Categories: 8

KB Article: Googletap with keywords in Url

Article:Googletap with keywords in Url     Popular
Submitted By:Telli
Date Added:03-08-2008 10:18:14
Hits:6,971



SEO titles in your URL's.


function prepare_title($title) {
   //this is how telli (http://www.codezwiz.com) gets seo titles
   $abc = "1234567890abcdefghijklmnopqrstuvwxyz_";
   $title = strtolower($title);
   $r = '';
   for($i=0; $i < strlen($title); $i++) {
      if (strpos($abc, $title[$i]) !== false) {
         $r .= $title[$i];
      }
      if ( ($title[$i] == ' ') && ($r[strlen($r)-1] != ' ') ) {
         $r .= ' ';
      }
   }
   $r = trim($r);
   return str_replace(' ', '-', $r);
}


To use:


$seo_title = prepare_title($title);
modules.php?name=Forums&file=viewtopic&t=$topic_id&title=$seo_title


If your having problems post a bit of the code where the issue is.


Post: [ Register or login to view links on this board. ]

Current rating: 8.43 by 83 users
Please take one second and rate this article...

Not a Chance 12345678910 Absolutely

Please register or sign-in to post comments.


Jump to a selected article...