Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php replace url in string

public function (Request $request)
{
	$geturl = $request->path();
    $string = 'whatever';
    $replace = str_replace($geturl, $string, $geturl);
    
    return response()->json(['Replaced' => $replace]);
}
 
PREVIOUS NEXT
Tagged: #php #replace #url #string
ADD COMMENT
Topic
Name
1+6 =