|
eregi_replace
|
Thread Tools | Display Modes |
|
|
|
#22
|
|||
|
|||
|
Essaye comme ça dans le sens BBCODE => HTML (le preg marche mieux que le ereg) :
$string = preg_replace('/\[url\=(http|ftp|https)\:\/\/([a-z0-9\/_\.\-]*)\](.*)\[\/url\]/iU', "<a href=\"\\1://\\2\" target=\"_blank\">\\3</a>", $string); Et pour le sens HTML => BBCODE, utilise : $string = preg_replace('<a href=\"([^\\[]*)\" target=_blank>([^\\[]*)</a> /iU', '[ url=\\1]\\2[/ url]', $string); Par contre, je vois pas trop l'intérêt de la manip dans ce sens ... :confused: |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
All times are GMT +2. The time now is 15:06.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.



























Threaded Mode
