Phpparse_str () function definition and usage, phpparse_str_PHP tutorial

Source: Internet
Author: User
Phpparse_str () function definition and usage, phpparse_str. Phpparse_str () function definition and usage. the phpparse_strphpparse_str () function parses the query string to a variable and is mainly used to pass values (parameters) between pages ). This article introduces the definition and usage of the php parse_str () function to the coders, phpparse_str

The php parse_str () function parses the query string to a variable and is mainly used to pass values (parameters) between pages ). This article describes how to use the php parse_str () function. For more information, see.

Definition and usage

The parse_str () function parses the query string to a variable.

Note: If the array parameter is not set, the variable set by this function overwrites the existing variable with the same name.

Note: The magic_quotes_gpc setting in the php. ini file affects the output of this function. If enabled, the variable will be converted by addslashes () before parse_str () resolution.

Syntax

parse_str(string,array) 

Parameters Description
String Required. Specifies the string to be parsed.
Array Optional. Specifies the name of the array that stores the variable. This parameter indicates that the variable will be stored in the array.

Technical details

Return value: No return value.
PHP version: 4 +
Update Log: In PHP 4.0.3ArrayParameters.

Instance

Store variables in the array:

<?php parse_str("name=Bill&age=60",$myArray); print_r($myArray); ?> 

The definition and usage of the above php parse_str () function is all the content that I have shared with you. I hope to give you a reference and support for the house of friends.

The definition and usage of the http://www.bkjia.com/PHPjc/1133100.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1133100.htmlTechArticlephp parse_str () function, phpparse_str php parse_str () function parses the query string to the variable, mainly used to pass values between pages (parameters ). This article is intended for codenon...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.