Web Programming Language/PHP

class

D4tai1 2018. 8. 21.

class

 

 

<?php
	class Student
	{
		var $StudentID;
		var $StudentName;

		function printStudent($id, $name)
		{
			print "ID : " .$id."
"; print "Name : " .$name."
"; } } $object = new Student; $object -> StudentID=7777; $object -> StudentName="d4tai1"; $object -> printStudent($object -> StudentID,$object -> StudentName); ?>

'Web Programming Language > PHP' 카테고리의 다른 글

PHP 기본상식  (0) 2018.08.21
jquery[basic]  (0) 2018.08.21
fopen, fput, fclose, fgets  (0) 2018.08.21
call by value, reference  (0) 2018.08.21
배열  (0) 2018.08.21

댓글