- strpos: documentation ( source)
<?php
// $a = ['item'=>['werwer'=>['tueiah'=>['auihi'=>'wieurh']]];
// $s = 'item.werwer.tueiah.auihi.wieurh';
$a = ['item'=>'werwer'];
$s = 'item.werwer';
echo get($a, $s);
// echo substr($s,0,strpos($s,'.'))."\n";
// echo substr($s,strpos($s,'.')+1)."\n";
function get($i, $c){
if(strpos($c,'.')){
}else{
return $i[$c];
}
}