Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
problem with a skipurl function, please help
Old 03-03-2010, 02:31 PM problem with a skipurl function, please help
Novice Talker

Posts: 9
Name: mohsen elgendy
Trades: 0
this function

PHP Code:
    function skipURL($string){
        
$string preg_replace("`\[.*\]`U","",$string);
        
$string preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$string);
        
$string htmlentities($stringENT_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
m-elgendy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-03-2010, 06:18 PM Re: problem with a skipurl function, please help
Novice Talker

Posts: 9
Name: mohsen elgendy
Trades: 0
any ideas
m-elgendy is offline
Reply With Quote
View Public Profile
 
Old 03-04-2010, 11:22 AM Re: problem with a skipurl function, please help
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
try using multibyte functions. it seem there is no multibyte version for preg_replace. but there is one for ereg_replace

http://www.php.net/manual/en/functio...eg-replace.php
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to problem with a skipurl function, please help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33991 seconds with 12 queries