Reputation: 4516
$url= "testę";
$urlLower = strtolower($url);
echo "$url<br> $urlLower ";
Outputs:
test%c4%99
test%C4%99
How to output
test%C4%99
test%C4%99
Upvotes: 3
Views: 155
Reputation: 2605
I think you want to take a look at urlencode:
$url = 'testę';
$urlLower = urlencode($url);
Which will give you:
$urlLower = 'test%C4%99'
http://php.net/manual/en/function.urlencode.php
Upvotes: 1