0
我想使用str_replace te替换变量中的某些值,并获取名为$ username的值为USERNAME的变量。它适用于一个值,但不适用于多个值。str_replace多个字符串
该工程..
$myabsoluteurl=JURI::current();
$replacestring='http://www.website.com/index.php/component/comprofiler/userprofile/';
$usertemp= str_replace($replacestring, '', $myabsoluteurl);
但是有四种可能性网址可怎么看,所以我需要4个变量
$replacestring1='http://www.website.com/index.php/component/comprofiler/userprofile/';
$replacestring2='http://www.website.com/index.php/instellingen/userprofile/';
$replacestring3='http://www.website.com/index.php/component/comprofiler/';
$replacestring4='http://www.website.com/index.php/instellingen';
怎样才能获得人四种可能性中剥离,所以我可以把剩下的值在一个变量?用户名始终放在四个URL之一的后面...