@ 2017-10-17T06:20:58Z <?php
$biger_array = array(
$a = array("DHL","ACS", "UPS"),
$b = array("PayPal", "BrainTree", "UnionPay")
);
$sizeof_biger_array = sizeof($biger_array);
$array_with_size_of_smaller_arrays = array();
for ($x=0; $x<$sizeof_biger_array; $x++){
//$array_with_size_of_smaller_arrays[] =;
$array_with_size_of_smaller_arrays[] = sizeof($biger_array[$x]);
}
function forLoopDynamic(array $array, array $number_of_vars_in_every_array) {
//print 'Inside `aMemberFunc()`';
$sizeOfTheBigerArray = sizeof($number_of_vars_in_every_array);
for ($i=0; $i<$sizeOfTheBigerArray; $i++){
echo $number_of_vars_in_every_array[$i];
//for ($x=0; $x<($number_of_vars_in_every_array[$i]); $x++){
//echo $array[$x];
//}
}
}
forLoopDynamic($a, $array_with_size_of_smaller_arrays);
//echo $biger_array[0][0];
//echo $biger_array[1][0];
echo sizeof($array_with_size_of_smaller_arrays);
//print_R($array_with_size_of_smaller_arrays);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.24 , 7.1.0 - 7.1.20 , 7.2.6 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.4 , 8.3.6 332 Output for 8.3.5 Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
332 preferences:dark mode live preview
150.66 ms | 402 KiB | 178 Q