Location: PHPKode > scripts > PHP Callback > php-callback/functions.inc.php
<?php
/*
    This functions is required for class phpCallback work properly

*/
function get_array_key($string="", $array=array(), $default=null)
{
    $separator=".";

    $array_keys = explode($separator,$string);
    foreach($array_keys as $key=>$value){
        if(isset($array[$value])){
            $array=$array[$value];
        } else {
            return $default;
        }
    }
    return $array;
}

/*

*/
function set_array_key($string="", &$value, &$array)
{
    $separator=".";

    $array_keys = explode($separator,$string);
    $ptr=&$array;
    foreach($array_keys as $k=>$v) $ptr=&$ptr[$v];
    $ptr=$value;

    return $value;
}
?>
Return current item: PHP Callback