what does urlencode do in php
snippet in php

php sanitize string for url

user1727

urlencode("https://geeksforgeeks.org/")

what does urlencode do in php

user8532

<?php 
  
// PHP program to illustrate urlencode function 
echo urlencode("https://geeksforgeeks.org/") . "\n"; 
  
?> 

what does urlencode do in php

user3098

<?php 
  
// PHP program to illustrate urlencode function 
echo urlencode("https://ide.geeksforgeeks.org/") . "\n"; 
echo urlencode("https://contribute.geeksforgeeks.org/") . "\n"; 
echo urlencode("https://practice.geeksforgeeks.org/") . "\n"; 
echo urlencode("https://geeksforgeeks.org/") . "\n"; 
  
?>