ホーム > PHPサンプル > 配列系 > 配列を変数へ変換したい
PHPサンプル

UPDATE:2017年03月29日

配列を変数へ変換したい

配列を変数へ変換「extract()」 PHPサンプルコード[ sample code ] | wepicks!
サンプルコード sample code

配列を変数へ変換 extract()

extract(配列);

例:

結果は

saitou

となります。

連想配列を変数へ変換します。連想配列を引数として、そのキーを変数名、値を変数の値として処理します。
※ユーザー入力 ($_GET や $_FILES など) のような信頼できないデータについて使してはいけません。フィルタリング処理を行ったクリーンなデータにする必要があります。


サンプルコード

– サンプル Click Here ! –

実行結果
配列を変数へ変換
鈴木suzuki@mail.com男

– サンプル Click Here ! –


タグ(=記事関連ワード)

タグ: , ,

日付

投稿日:2012年3月2日
最終更新日:2017年03月29日

このカテゴリの他のページ

この記事へのコメント

トラックバックurl

https://wepicks.net/phpsample-array-arychgvar/trackback/

page top

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny