Focus mode
<?php
$araç = array('tabanvay', 'bisiklet', 'otomobil', 'uçak');
$kip = current($araç); // $kip = 'tabanvay';
$kip = next($araç); // $kip = 'bisiklet';
$kip = current($araç); // $kip = 'bisiklet';
$kip = next($araç); // $kip = 'otomobil';
$kip = prev($araç); // $kip = 'bisiklet';
$kip = end($araç); // $kip = 'uçak';
$kip = current($araç); // $kip = 'uçak';
$arr = array();
var_dump(current($arr)); // bool(false)
$arr = array(array());
var_dump(current($arr)); // array(0) { }
?>
<?php
/* Dizinin wddx_deserialize tarafından döndürülen
bir dizi olduğunu varsayalım */
$boyut = "büyük";
$dizi = array("renk" => "mavi",
"boyut" => "orta",
"şekil" => "küre");
extract($dizi, EXTR_PREFIX_SAME, "wddx");
echo "$renk, $boyut, $şekil, $wddx_boyut\n";
?>
// Çıktısı: mavi, büyük, küre, orta
<?php
$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
asort($fruits);
foreach ($fruits as $key => $val) {
echo "$key = $val\n";
}
?>
<?php
$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
arsort($fruits);
foreach ($fruits as $key => $val) {
echo "$key = $val\n";
}
?>
ksort();
<?php
$fruits = array("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
ksort($fruits);
foreach ($fruits as $key => $val) {
echo "$key = $val\n";
}
?>
<?php
$fruits = array("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
krsort($fruits);
foreach ($fruits as $key => $val) {
echo "$key = $val\n";
}
?>
Programs to Accelerate Your Progress in a Software Career
Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!
You need to enroll in the course to be able to comment!