PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

 
Last updated: Fri, 29 Aug 2008

view this page in

ArrayObject::__construct

(PHP 5)

ArrayObject::__construct新規配列オブジェクトを生成する

説明

ArrayObject::__construct ( mixed $input )

新規配列オブジェクトを生成します。

パラメータ

input

input には、 配列あるいは別の ArrayObject を指定することができます。

返り値

値を返しません。

例1 ArrayObject::__construct() の例

<?php
$array 
= array('1' => 'one',
               
'2' => 'two',
               
'3' => 'three');

$arrayobject = new ArrayObject($array);

var_dump($arrayobject);
?>

上の例の出力は以下となります。

object(ArrayObject)#1 (3) {
  [1]=>
  string(3) "one"
  [2]=>
  string(3) "two"
  [3]=>
  string(5) "three"
}



add a note add a note User Contributed Notes
ArrayObject::__construct
There are no user contributed notes for this page.

 
Last updated: Fri, 29 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites