★ wanayoo — archive 1999 http://www.php.net/manual/ja/function.parse-str.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to 文字列
Quick Reference
English version of this pageGerman version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
文字列
* AddCSlashes
* AddSlashes
* bin2hex
* Chop
* Chr
* chunk_split
* convert_cyr_string
* count_chars
* crc32
* crypt
* echo
* explode
* flush
* get_html_translation_table
* get_meta_tags
* hebrev
* hebrevc
* htmlentities
* htmlspecialchars
* implode
* join
* levenshtein
* ltrim
* md5
* Metaphone
* nl2br
* ob_start
* ob_get_contents
* ob_end_flush
* ob_end_clean
* ob_implicit_flush
* Ord
* parse_str
* print
* printf
* quoted_printable_decode
* QuoteMeta
* rtrim
* sscanf
* setlocale
* similar_text
* soundex
* sprintf
* strcasecmp
* strchr
* strcmp
* strcspn
* strip_tags
* StripCSlashes
* StripSlashes
* stristr
* strlen
* str_pad
* strpos
* strrchr
* str_repeat
* strrev
* strrpos
* strspn
* strstr
* strtok
* strtolower
* strtoupper
* str_replace
* strtr
* substr
* substr_count
* substr_replace
* trim
* ucfirst
* ucwords
Manual: parse_str
View the source code for this pageSearch the site



Previous page
 Ord
 Updated
Mon, 14 Aug 2000
print 
Next page


parse_str

(PHP3 , PHP4 )

parse_str -- 文字列を処理し、変数に代入する

説明

void parse_str (string str)

URL経由で渡されるクエリー文字列と同様にstr を処理し、現在のスコープに変数をセットします。

例 1. parse_str()の使用法


$str = "first=value&second[]=this+works&second[]=another";
parse_str($str);
echo $first;     /* "value" を出力 */
echo $second[0]; /* "this works" を出力 */
echo $second[1]; /* "another" を出力 */
      


User Contributed Notes: parse_str


skelly@juptech.com
26-Mar-2000 11:55
Damn! What a great function - but it doesn't work unless gpc_globals is enabled. I thinks this is a bug (or at least an undesirable feature)...


karme@unforgettable.com
28-Mar-2000 11:40
See also set_magic_quotes_runtime


karme@unforgettable.com
28-Mar-2000 11:48
If you use server authentication be careful with:
<PRE>parse_str(QUERY_STRING)</pre>
In fact you should always be careful with this one ;-)



greg@softhome.net
03-Aug-2000 08:51
to make a javascript style array, (as in):

<input type=text name="bla">
<input type=text name="bla">

instead of using <input name="bla"> use <input name="bla[]">.

This is also how you can add things to an array in php code, $bla[] = "hello"; $bla[] = "there"; returns an array bla ("hello","there")



 About Notes


Previous page
 Ord
 Updated
Mon, 14 Aug 2000
print 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.