furkanacikdeniz / function

php function
0 stars 0 forks source link

code #1

Open furkanacikdeniz opened 3 months ago

furkanacikdeniz commented 3 months ago

<?php function ucgen($sayi){ for($i=1;$i<=$sayi;$i++) { $j=0; while($j<$i){ echo "0"; $j++; } echo "
"; }

} ucgen(15); ?>

furkanacikdeniz commented 3 months ago

<?php function ucgen($sayi){ for($i=1;$i<=$sayi;$i++) { $j=0; while($j<$i){ echo "0"; $j++; } echo "
"; }

} ucgen(15); ?>

furkanacikdeniz commented 3 months ago

<?php

$planets =["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "", "", NULL];

$filtered = array_filter($planets);

$randplanet = array_rand($filtered,2);

echo "

";

function randomfunc(){ global $filtered; global $randplanet; echo $filtered[$randplanet[0]] ;

} randomfunc(); randomfunc(); randomfunc(); randomfunc();

?>