<?php

   $objStudent = StudentFactory::getStudent(12345); // 12345 to ID studenta
   print "Imi i nazwisko: " . $objStudent->name . "<br>\n";
   print "Kursy: <br>\n";
   foreach($objStudent->courses as $objCourse) {
      print $objCourse->coursecode . " - " . $objCourse->name . "<br>\n";
   }
?>