本文整理匯總了PHP中Subject::getAZSubjects方法的典型用法代碼示例。如果您正苦於以下問題:PHP Subject::getAZSubjects方法的具體用法?PHP Subject::getAZSubjects怎麽用?PHP Subject::getAZSubjects使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Subject
的用法示例。
在下文中一共展示了Subject::getAZSubjects方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Subject
unset($user2);
////////////////////////////
//Subject UNIT TESTS
////////////////////////////
printf("/////////////////////////////////\n");
printf("STARTING Subject UNIT TESTS\n");
printf("/////////////////////////////////\n");
//construct subject
$subject = new Subject();
//add subject
$subject->addSubject("Math");
//get subject
$subject_string = $subject->getSubject();
printf("Got Subject: %s\n", $subject_string);
//get AZSubjectArray
$orderedArray = $subject->getAZSubjects();
printf("Ordered Subjects: \n");
foreach ($orderedArray as $subject_val) {
printf("%s\n", $subject_val);
}
////////////////////////////
//Classes UNIT TESTS
////////////////////////////
printf("/////////////////////////////////\n");
printf("STARTING Classes UNIT TESTS\n");
printf("/////////////////////////////////\n");
//construct empty class
$class = new Classes();
//add a class
$class->addClass("Calculus I", "Math");
unset($class);
示例2: Subject
<?php
session_start();
//print_r($_SESSION);
?>
<?php
foreach (glob("apps/studyhall/models/*.php") as $filename) {
include_once $filename;
}
$subject = new Subject();
$all_subs = $subject->getAZSubjects();
$classes = new Classes();
$dict = [];
foreach ($all_subs as $s) {
$dict[$s] = $classes->getClassBySubject($s);
}
?>
<form role="form" action="../documents/uploadDoc" method="post" enctype="multipart/form-data">
<TABLE>
<TR>
<TD>Document Subject:</TD>
<TD>
<div class="form-group">
<label for="sel1"></label>
<select class="form-control" id="sel1" name="subject">
<option value="lel" selected>---Select Subject---</option>