LoginSignup
2
3

More than 5 years have passed since last update.

PHP foreach文でキーと値を取得

Posted at

<?php
$test_array = array(
"aaa" => "A", "bbb" => "B", "ccc" => "C", "ddd" => "D", "eee" => "E",
"fff" => "F", "ggg" => "G", "hhh" => "H", "iii" => "I", "jjj" => "J"
);

foreach($test_array as $a => $b){
print $a."=>".$b."
";
}

2
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3