Code:
$phpEx = "php";
$url = "index.$phpEx?c=12";
if (eregi("^index.$phpEx?c=([[:digit:]]+)$", $url)){
$url = eregi_replace("^index.$phpEx?c=([[:digit:]]+)$", "categorie-\\1.html", $url);
}
echo $url
Est-ce que quelqu'un a une idée :?:
$phpEx = "php";
$url = "index.$phpEx?c=12";
if (eregi("^index.$phpEx?c=([[:digit:]]+)$", $url)){
$url = eregi_replace("^index.$phpEx?c=([[:digit:]]+)$", "categorie-\\1.html", $url);
}
echo $url
$url = preg_replace('/^index\.'.$phpEx.'\?c=([0-9]+)/i', 'categorie-$1.html', $url);