コード例 #1
0
ファイル: role-call-2.0.php プロジェクト: aperuzzo/phpCourse
<html>
<body>
	<?php 
$students = array('Claire', 'Michelle', 'Anthony', 'Kelly');
//define students
function roleCall($people)
{
    foreach ($people as $person) {
        echo $person, '</br>';
    }
}
roleCall($students);
//call function
?>
</body>
</html>
コード例 #2
0
ファイル: role-call-1.0.php プロジェクト: aperuzzo/phpCourse
<html>
<body>
	<?php 
function roleCall()
{
    $students = array('Claire', 'Michelle', 'Anthony', 'Kelly');
    //define students
    foreach ($students as $studnet) {
        echo $studnet, '</br>';
    }
}
roleCall();
//call function
?>
</body>
</html>