Generation

generate functionFri, 13 Jan 2023

指定された講義情報を表示するプログラム

<?php $lectures = [ [ 'name' => 'Programing 101', 'instructor' => [ 'firstName' => 'Jane', 'lastName' => 'Doe', 'email' => 'jane@doe.com', ], ], [ 'name' => 'Programing 102', 'instructor' => [ 'firstName' => 'John', 'lastName' => 'Doe', 'email' => 'john@doe.com', ], ], [ 'name' => 'Programing 103', 'instructor' => [ 'firstName' => 'Tom', 'lastName' => 'Doe', 'email' => 'tom@doe.com', ], ], ]; function getInstructor($lectures, $lecture_name) { foreach ($lectures as $lecture) { if ($lecture['name'] === $lecture

Questions about programming?Chat with your personal AI assistant