faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

How would you create a regular method within a class?

Mar 22nd, 2008 21:09
ha mo, Himanshu Jain,


A method is a function of any name declared within a class;
Class point
       {
       //properties
       var $x = 0;
        vr  $y = 0;
        //constructor
         Function point( $x , $y )
                  {
                  //set up code goes here
                  }
           //method
           function moveTo( $x , $y )
                   {
                   }
             }
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com