SYNCERのロゴ
アイキャッチ画像

array_values - 配列の値の一覧を取得する

array_valuesは、指定した配列の値の一覧を取得する関数です。

構文

array array_values ( array $array )

パラメータ

$array

対象の配列。

返り値

array

値の一覧の配列。

サンプルコード

<?php
	$array = [
		"a" => "AA" ,
		"b" => "BB" ,
		"c" => "CC" ,
	] ;

	$response = array_values( $array ) ;

デモ

ある配列の値の一覧を取得します。

<?php
/*** このコードは編集できます。 ***/

	$array = [
		"a" => "AA" ,
		"b" => "BB" ,
		"c" => "CC" ,
	] ;

	$response = array_values( $array ) ;

	print_r( $response ) ;
  • Twitterでシェア
  • Facebookでシェア
  • Google+でシェア
  • はてなブックマークでシェア
  • pocketに保存
  • LINEでシェア
更新履歴
2017年6月25日 (日)
コンテンツを公開しました。