ホーム > PHPサンプル > 配列系 > 配列要素を変数に格納したい
PHPサンプル

UPDATE:2017年03月29日

配列要素を変数に格納したい

配列要素を変数に格納「list()」 PHPサンプルコード[ sample code ] | wepicks!
サンプルコード sample code

配列要素を変数に格納 list()

list(変数 [, 変数, , ,]) = 配列;
//[ ]省略化

例:

結果は

コーヒー 牛乳 紅茶

となります。

配列要素の値を変数へ代入します。


サンプルコード

– サンプル Click Here ! –

実行結果
配列要素を変数に格納
山田太郎さん 28歳 男性
山田太郎さん 男性

ネストしたlist()の使用法
No.32 : 山田太郎さん 28歳
int(32) string(12) "山田太郎" int(28)

– サンプル Click Here ! –


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

タグ: , ,

日付

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

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

この記事へのコメント

トラックバックurl

https://wepicks.net/phpsample-array-arytovar/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