PHP | rawurlencode() function Last Updated : 16 Aug, 2018 Comments Improve Suggest changes Like Article Like Report The rawurlencode() function is an inbuilt function in PHP which is used to encode the URL(Uniform Resource Locator) according to RFC(Uniform Resource Identifier) 3986. Syntax: string rawurlencode( $str ) Parameters: This function accepts single parameters $str which is mandatory. It is used to store the URL which is to be encoded. Return Value: This function returns a string which contains all non-alphanumeric characters except -_.~ symbols. The symbols or space character replaced with a percent (%) sign followed by two hex digits. Below programs illustrate the rawurlencode() function in PHP. Program 1: php <?php echo '<a href="www.geeksforgeeks.org', rawurlencode('A computer science portal for geek'), '">'; ?> Output: <a href="www.geeksforgeeks.orgA%20computer%20science%20portal%20for%20geek"> Program 2: php <?php // Store the URL string $str = 'A computer science portal for geek'; // Encode the URL string and print it. echo '<a href="www.geeksforgeeks.org', rawurlencode($str), '">'; ?> Output: <a href="www.geeksforgeeks.orgA%20computer%20science%20portal%20for%20geek"> Related Articles: PHP | base64_encode() Function PHP | base64_decode() Function Reference: http://php.net/manual/en/function.rawurlencode.php Comment More infoAdvertise with us Next Article PHP | rawurlencode() function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP PHP-function Practice Tags : Misc Similar Reads PHP | rawurldecode() function The rawurldecode() function is an inbuilt function in PHP which is used to decode the encoded string. This function returns the decoded URL (original URL string) as a string. This function replaces the % sign followed by two hex value with literal characters. Syntax: string rawurldecode( $str ) Para 1 min read PHP urlencode() Function The urlencode() function is an inbuilt PHP function used to encode the URL. This function returns a string consisting of all non-alphanumeric characters exceptâ_. It is replaced by the percent (%) sign, followed by two hex digits and spaces encoded as plus (+) signs. Syntax:string urlencode( $input 1 min read PHP | urldecode() Function The urldecode() function is an inbuilt function in PHP which is used to decode url that is encoded by the encode () function. Syntax:string urldecode( $input )Parameters: This function accepts a single parameter $input which holds the url to be decoded. Return Value: This function returns the decode 1 min read PHP strlen() Function The strlen() is a built-in function in PHP which returns the length of a given string.It calculates the length of the string including all the whitespaces and special characters. Syntax:strlen($string);Parameters: This parameter represents the string whose length is needed to be returned. Return Val 1 min read PHP mb_strlen() Function The mb_strlen() is an inbuilt PHP function that returns the string length in an integer. Syntax: mb_strlen($string, $encoding ): intParameters: This function accepts 2 parameters that are described below: $string: The string parameter whose lengths need to be determined. It is a required parameter.$ 1 min read PHP | ftp_raw() function The ftp_raw() function is an inbuilt function in PHP which is used to send a raw command to the Remote server i.e. FTP Server. Syntax:Â ftp_raw( $ftp_connection, $command ) Parameters: This function accepts two parameters as mentioned above and described below:Â Â $ftp_connection: It is required para 2 min read PHP strrchr Function The strrchr() function is a built-in function in PHP. This function takes two arguments a string and a character. This function searches the given character in the given string and returns the portion of string starting from the last occurrence of the given character in that string. Syntax: strrchr( 2 min read PHP | parse_url() Function The parse_url() function is an inbuilt function in PHP which is used to return the components of a URL by parsing it. It parses an URL and return an associative array which contains its various components. Syntax: parse_url( $url, $component = -1 ) Parameters: This function accepts two parameters as 2 min read PHP String Functions Strings are a fundamental data type in PHP, used to store and manipulate text. PHP provides a wide variety of built-in string functions. These functions perform various operations such as string transformations, character manipulations, encoding and decoding, and formatting, making string handling s 6 min read PHP mb_strtolower() Function The mb_strtolower() is a PHP inbuilt function that returns lowercase alphanumeric characters. Syntax: mb_strtolower(string $string, ?string $encoding = null): stringParameters: This function accepts 2 parameters: string: This parameter specifies the lowercase string.encoding: This parameter denotes 1 min read Like