• Sorular
  • Etiketler

Php bir işlevin bağımsız değişken listesi içeren bir ilişkisel dizi döndürür

0 Cevap php

php func_get_args - bir işlevin bağımsız değişken listesi içeren bir dizi döndürür

döndürür numeric index array

biz associative array , yani anahtar => değer çifti olsun hangi php herhangi bir fonksiyon / yol yoktur

i örnekle açıklayan m:

test.php

<?php

function foo() {
    include './fga.inc';
}
$x=20;
$y=30;

foo($x, $y);
?>

fga.inc

<?php

$args = func_get_args();
echo "<pre>";
print_r($args);
echo "</pre>";

?>

hangi gereken döner

array (
  'x'=> 20,
  'y' => 30,
)

0 Cevap

etiketler

  • php
  • associative-array
  • Sorular
  • Etiketler
Copyright © 2014

Powered by EvrenWeb Int. Media.