本文整理汇总了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>