Programming and Webmasters forum
HomeSearchRecent PostsLoginRegister Contact Us

Username  
Password
Announcing 14th Weekly Contest - From 25 July To 01 August.

Win every week on this forum.

Chek out How To Win?
 

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

problem with a skipurl function, please help

 
webmaster forum
Contest Points: 100
 
New Coder
Posts: 10
Topics: 2
March 03, 2010, 06:44:16 AM

this function


Code:
function skipURL($string){
        $string = preg_replace("`\[.*\]`U","",$string);
        $string = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$string);
        $string = htmlentities($string, ENT_COMPAT, 'utf-8');
        $string = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i","\\1", $string );
        $string = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $string);
        return strtolower(trim($string, '-'));
    }

this works like what i need.

but im haveing a problem this function works good with english language but what if there is any kind of other language


like arabic for examble

if i have this string with english

LOREM _ DolOr :^*(

the function going to make like that

lorem-dolor

but what if there a string like that

english :: عربى

it's going to be like that

english

i just want it to be like that

english-عربى

so please if anyone can help me with this

thanks

croatia apartments
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC


Google visited last this page July 22, 2010, 08:05:27 PM

Valid XHTML 1.0 Transitional     Valid XHTML 1.0 Transitional