note 80020 deleted from ref.array by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: geo at avelgold dot ru 

----

<?php
$array['weight']='weight';
$array['price']=array('value1'=>'v1','value2'=>'v2');
$array['count']='count';

print get_value($array, 'price.value2');

function get_value($array, $st)
{
$stroka=$st;
$st=explode('.',$st);	

if (count($st)>1 and is_array($array))
{
foreach ($st as $value)
	{
	if (isset($array[$value])) 
	  {
		$stroka=substr($stroka,strpos($stroka,'.')+1);
		return get_value($array[$value],$stroka);
		break;
	  }	
		
	}
}
if (count($st)==1 and is_array($array)==1) return $array[$st[0]];
}
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.