Urlencoding in PHP using urlencode

<?php
$myurlparam = "hello this is a test message";
$site = "http://www.w3mentor.com";
$query = $site;
$query .= "&message=".urlencode( $myurlparam );
echo $query;
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.