function getElement(&$array, $path)
{
if (count($path)==0) return $array;
return getElement($array[array_shift($path)], $path);
}
$arr = array(
'one' => array(
'two' => array(
'three' => 'stroka'
)
)
);
$path = array(
'one',
'two',
'three'
);
echo getElement($arr, $path);
angular.forEach(ProductsList, function(value, key) {
}
var counter = 4;
var inter = setInterval(function() {
a.innerHTML = counter--;
if (!counter) clearInterval(inter);
}, 2000);
function fix(e, value) {
e = $(e);
e.find("option").each(function(id, e) {
if (e.value == value) {
e.selected = true;
retunr;
}
});
}
fix("#chooser", "20px");
Adblock отключите
$db->query("UPDATE users SET happiness = happiness + 1 WHERE happiness >= 10 AND happiness < 15");
$db->query("UPDATE users SET happiness = happiness + 3 WHERE happiness >= 0 AND happiness < 5");