Array List And Array Value

public $array_boy=array(‘1’=>‘ravi’,‘2’=>‘ajay’,‘3’=>‘raj’);

public function getArrayList($arrayname)

{


	return $this->$arrayname;


}





public function getArrayvalue($arrayname, $key)


{





		$a	=	$this->$arrayname;





		return $a[$key];


}

<div class="field">

	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'boy'); ?&gt;


    &lt;?php echo &#036;form-&gt;dropDownList(&#036;model,'boy',boy::model()-&gt;getArrayList(&quot;array_boy&quot;),array('select' =&gt;'select')); ?&gt;


	&lt;?php echo &#036;form-&gt;error(&#036;model,'boy'); ?&gt;

</div>

array(

	 		'name'=&gt;'boy',


			'value'=&gt;&#036;model-&gt; getArrayvalue('array_boy',&#036;model-&gt;boy),

),

[size=2]Nice One… But I can not understand the actual use of this model function. This is useful for static array only… Am i right??[/size]