Display array values in PHP

前端 未结 9 2284
名媛妹妹
名媛妹妹 2020-12-01 07:51

So, I\'m working with PHP for the first time and I am trying to retrieve and display the values of an array. After a lot of googling, the only methods I can find for this ar

9条回答
  •  悲哀的现实
    2020-12-01 08:02

    Iterate over the array and do whatever you want with the individual values.

    foreach ($array as $key => $value) {
        echo $key . ' contains ' . $value . '
    '; }

提交回复
热议问题