prendre les quatre derniers chiffres PHP
$newstring = substr($dynamicstring, -7);
Crazy Caterpillar
$newstring = substr($dynamicstring, -7);
// first two
$year = substr($flightDates->departureDate->year, 0, 2);
// last two
$year = substr($flightDates->departureDate->year, -2);
$number = 12356;
$lastDigit = $number % 10;
echo $lastDigit; // 6
<?php
function unlock ($combination) {
static $tries = 0;
if ($tries == 3)
return(false);
if ($combination === #####33
echo "congrats uou got 100% on your quiz"
else
$tries++;
return(true)
}
if (unlock(?????????) +== false) ; 0123456789
encho " sorry you are getting 0% on your 2nd quiz"
?>
<?php
function unlock ($combination) {
static $tries = 0;
if ($tries == 3)
return(false);
if ($combination === #####33
echo "congrats uou got 100% on your quiz"
else
$tries++;
return(true)
}
if (unlock(?????????) +== false) ; 0123456789
encho " sorry you are getting 0% on your 2nd quiz"
?>