note 128522 added to control-structures.while

From: Date: Thu, 11 May 2023 05:20:00 +0000
Subject: note 128522 added to control-structures.while
Groups: php.notes 
Request: Send a blank email to php-notes+get-220477@lists.php.net to get a copy of this message
<?php $fobiNr = 1234500; echo getPruefziffer($fobiNr); function getPruefziffer($fobiNr) { $pruefziffer = 0; $gewichtung = 2; $summe = 0; while($fobiNr > 0) { $ziffer = $fobiNr % 10; $summe = $summe + $ziffer * $gewichtung; $fobiNr = $fobiNr / 10; $gewichtung = $gewichtung + 1; } $pruefziffer = 11 - ($summe % 11); if($pruefziffer == 10 || $pruefziffer == 11) { $pruefziffer = 0; } return $pruefziffer; } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.13.130 (proxied: 91.89.113.224) ---- Manual Page -- https://php.net/manual/en/control-structures.while.php Edit -- https://main.php.net/note/edit/128522 Del: integrated -- https://main.php.net/note/delete/128522/integrated Del: useless -- https://main.php.net/note/delete/128522/useless Del: bad code -- https://main.php.net/note/delete/128522/bad+code Del: spam -- https://main.php.net/note/delete/128522/spam Del: non-english -- https://main.php.net/note/delete/128522/non-english Del: in docs -- https://main.php.net/note/delete/128522/in+docs Del: other reasons-- https://main.php.net/note/delete/128522 Reject -- https://main.php.net/note/reject/128522 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220477) next »