当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::add_email方法代码示例

本文整理汇总了PHP中Student::add_email方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::add_email方法的具体用法?PHP Student::add_email怎么用?PHP Student::add_email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student::add_email方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Student

$students['j123'] = $first;
// add a second student
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
// add a third student
$third = new Student();
$third->surname = "Wubs";
$third->first_name = "Rosanna";
$third->add_email('home', 'rwubs@brains.com');
$third->add_grade(100);
$third->add_grade(100);
$third->add_grade(100);
$students['a000'] = $third;
// sort the students in the array via id
ksort($students);
// display students
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:rosannawubs,项目名称:phpLab1,代码行数:30,代码来源:index.php

示例2: Student

//initialize the second Student
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
//initialize the third Student
$third = new Student();
$third->surname = "Ensom";
$third->first_name = "James";
$third->add_email('home', 'james.ensom@gmail.com');
$third->add_email('work1', 'jensom@bcit.ca');
$third->add_grade(92);
$third->add_grade(88);
$third->add_grade(54);
$students['t789'] = $third;
//sort the Students
ksort($students);
//print out the Students using the toString method
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:JamesEnsom,项目名称:COMP4711Lab1,代码行数:30,代码来源:index.php

示例3: Student

//Create second student and add info
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
//Add myself as a student
$third = new Student();
$third->surname = "Wong";
$third->first_name = "Jason";
$third->add_email('home', 'jason@wong.com');
$third->add_email('work', 'j_wong@bcit.ca');
$third->add_grade(95);
$third->add_grade(95);
$third->add_grade(98);
$students['j987'] = $third;
//Sort the students
ksort($students);
//Print all students
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:JWongBCIT,项目名称:Lab1,代码行数:30,代码来源:index.php

示例4: Student

//Creating the second student
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
//Creating the third student
$third = new Student();
$third->surname = "Parry";
$third->first_name = "Jim";
$third->add_grade(0);
$third->add_grade(40);
$third->add_email('work', 'jim_perry@bcit.ca');
//Add to array and sort
$students = array();
$students['j123'] = $first;
$students['a456'] = $second;
$students["b212"] = $third;
ksort($students);
//Display the students
foreach ($students as $student) {
    echo $student->toString();
}
?>
     </body>
 </html>
开发者ID:askho,项目名称:labs,代码行数:30,代码来源:index.php

示例5: Student

// Adding the Second Student
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
// Adding a third Student, myself!
$third = new Student();
$third->surname = "Yiu";
$third->first_name = "Julia";
$third->add_email('home', 'jyiu93@gmail.com');
$third->add_email('work', 'jyiu8@my.bcit.ca');
$third->add_grade(90);
$third->add_grade(75);
$third->add_grade(90);
$students['a009'] = $third;
// A sort function that sorts an array by key. In this case, it is
// sorting the Students array.
ksort($students);
// A for-each loop that prints out each student entered
// in the array of students
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
开发者ID:juliayiu,项目名称:COMP4711-LAB1,代码行数:31,代码来源:index.php

示例6: Student

$first->add_grade(55);
$students['j123'] = $first;
/*adding a second student*/
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
/*adding a myself*/
$third = new Student();
$third->surname = "Dobrianskaia";
$third->first_name = "Nadia";
$third->add_email('work', 'nadezhdadobrianskaia@gmail.com');
$third->add_grade(95);
$third->add_grade(80);
$students['n789'] = $third;
/*sort the student order*/
ksort($students);
/*displaying the students*/
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:NadezhdaDobrianskaia,项目名称:comp4711-lab1,代码行数:30,代码来源:index.php

示例7: Student

$first->add_grade(55);
$students['j123'] = $first;
//creates a second student
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
//creates a third student
$third = new Student();
$third->surname = "Langaditis";
$third->first_name = "Speridon";
$third->add_email('home', 'slangaditis94@hotmail.com');
$third->add_grade(100);
$third->add_grade(100);
$students['s789'] = $third;
//sorts the students alphabetically
ksort($students);
//displays all the students
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:spero-langaditis,项目名称:lab1,代码行数:30,代码来源:index.php

示例8: Student

$students['j123'] = $first;
$second = new Student();
// adds second student
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
$third = new Student();
// adds third student
$third->surname = "Tangeman";
$third->first_name = "Kevin";
$third->add_email('home', 'kevint@kt.ca');
$third->add_email('work', 'ktanageman@work.com');
$third->add_grade(90);
$third->add_grade(80);
$students['k789'] = $third;
ksort($students);
// one of the many sort functions
foreach ($students as $student) {
    // displays each student in the array
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:unclekevin,项目名称:4711Lab1,代码行数:30,代码来源:index.php

示例9: Student

$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
/**
 * Adds the third student (Myself) and defines it's properties
 */
$third = new Student();
$third->surname = "Zhou";
$third->first_name = "Becky";
$third->add_email('home', 'becky@home.com');
$third->add_email('work', 'bzhou@work.ca');
$third->add_email('school', 'bzhou_13@bcit.ca');
$third->add_grade(100);
$third->add_grade(50);
$third->add_grade(60);
$students['b789'] = $third;
/**
 * Sorts students in alphabetical order
 */
ksort($students);
/**
 * Displays all students
 */
foreach ($students as $student) {
    echo $student->toString();
开发者ID:beckyzhou,项目名称:4711lab1,代码行数:31,代码来源:index.php

示例10: Student

$first->add_email('home', 'john@doe.com');
$first->add_email('work', 'jdoe@mcdonals.com');
$first->add_grade(65);
$first->add_grade(75);
$first->add_grade(55);
$students['j123'] = $first;
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@brainiacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(85);
$second->add_grade(90);
$second->add_grade(50);
$students['a456'] = $second;
$third = new Student();
$third->surname = "Tekenos";
$third->first_name = "Jessica";
$third->add_email('home', 'jessicatekenos@gmail.com');
$third->add_email('school', 'jtekenos@my.bcit.ca');
$third->add_grade(97);
$third->add_grade(88);
$third->add_grade(67);
$students['j514'] = $third;
//sorts students
ksort($students);
//displays each student object in the array
foreach ($students as $student) {
    echo $student->toString();
}
开发者ID:jtekenos,项目名称:COMP4711Lab1,代码行数:31,代码来源:index.php

示例11: Student

//Student 2
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
//Student 3
$third = new Student();
$third->surname = "Wong";
$third->first_name = "Evanna";
$third->add_email('home', 'evannawong92@gmail.com');
$third->add_grade(80);
$third->add_grade(84);
$third->add_grade(70);
$students['e789'] = $third;
//sort student array
ksort($students);
// one of the many sort functions
//print array
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:evannawong,项目名称:COMP-4711-lab-1,代码行数:30,代码来源:index.php

示例12: Student

//Add second student
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
//Add third student
$third = new Student();
$third->surname = "Huang";
$third->first_name = "Vincent";
$third->add_email('home', 'poshenhuang123@hotmail.com');
$third->add_email('work', 'vhuang@bcit.ca');
$third->add_grade(99);
$third->add_grade(99);
$third->add_grade(99);
$students['v123'] = $third;
//Sort the student list
ksort($students);
//Print students
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:sschocolate,项目名称:comp4711,代码行数:30,代码来源:index.php

示例13: Student

$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
//add the second student to the array
$students['a456'] = $second;
//create the third student
$third = new Student();
$third->surname = "Pearen";
$third->first_name = "Jonny";
$third->add_email('personal', 'jonnypearen@gmail.com');
$third->add_grade(90);
$third->add_grade(80);
$third->add_grade(70);
//add the third student to the array
$students['p789'] = $third;
//sort the students by key
ksort($students);
// one of the many sort functions
//echo each student in the students array using the toString method
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:JonnyPearen,项目名称:4711-lab-1,代码行数:31,代码来源:index.php

示例14: array

    <body>
      <?php 
include 'student.php';
$students = array();
foreach ($students as $student) {
    echo $student->toString();
}
$first = new Student();
$first->surname = "Doe";
$first->first_name = "John";
$first->add_email('home', 'john@doe.com');
$first->add_email('work', 'jdoe@mcdonalds.com');
$first->add_grade(65);
$first->add_grade(75);
$first->add_grade(55);
$students['j123'] = $first;
$second = new Student();
$second->surname = "Einstein";
$second->first_name = "Albert";
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;
ksort($students);
?>
    </body>
</html>
开发者ID:ExtricateX,项目名称:comp4711lab1,代码行数:30,代码来源:index.php

示例15: Student

// Create Duy
$student2 = new Student();
$student2->surname = "Le";
$student2->first_name = "Duy";
$student2->add_email('home', 'duy@hotmail.com');
$student2->add_email('work', 'duy@rcmp.com');
$student2->add_grade(10);
$student2->add_grade(8);
$student2->add_grade(9);
// Add Duy to array of students
$students['duy'] = $student2;
// Create Jens
$student3 = new Student();
$student3->surname = "Christiansen";
$student3->first_name = "Jens";
$student3->add_email('home', 'jens@hotmail.com');
$student3->add_email('work', 'jens@work.com');
$student3->add_grade(100);
$student3->add_grade(89);
$student3->add_grade(99);
// Add Jens to array of students
$students['jens'] = $student3;
// sort by key
ksort($students);
// Print each student
foreach ($students as $student) {
    echo $student->toString();
}
?>
    </body>
</html>
开发者ID:JensErikChristiansen,项目名称:Lab1,代码行数:31,代码来源:index.php


注:本文中的Student::add_email方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。