|
update : 2015.11.03
php.shukuma.com검색:
|
array_column(PHP 5 >= 5.5.0, PHP 7) array_column — Return the values from a single column in the input array 설명
array_column() returns the values from a single column of
the 인수
반환값Returns an array of values representing a single column from the input array. 예제
Example #1 Get column of first names from recordset
<?php위 예제의 출력:
Array
(
[0] => John
[1] => Sally
[2] => Jane
[3] => Peter
)
Example #2 Get column of last names from recordset, indexed by the "id" column
<?php위 예제의 출력:
Array
(
[2135] => Doe
[3245] => Smith
[5342] => Jones
[5623] => Doe
)
|