10 lines
166 B
PHP
10 lines
166 B
PHP
|
<?php
|
||
|
|
||
|
function countStuds($subjects)
|
||
|
{
|
||
|
$nb = 0;
|
||
|
foreach($subjects as $subject) {
|
||
|
$nb += substr_count($subject->sujet, ',')+1;
|
||
|
}
|
||
|
return $nb;
|
||
|
}
|