How to define subroutine

From: Date: Tue, 08 Jan 2002 06:32:40 +0000
Subject: How to define subroutine
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-79755@lists.php.net to get a copy of this message
Hi I am new to PHP and want to do object oriented programming in PHP. I want to write a subroutine and call that subroutine. I tried the following code but it gives me an error. Regards Sanjay <? $ref = testfun(); print "Ref is $ref"; sub testfun() { return HI; } ?>

« previous php.general (#79755) next »