Results 1 to 3 of 3

Thread: [RESOLVED] php class question, clarification before coding

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Resolved [RESOLVED] php class question, clarification before coding

    Code:
    <?php
    class verify{
       $db = ... db connection stuff
    
       function get_suff(){
    
       }
    
       function get_other_stuff() {
    
       }
    
    }
    If I define a db connection above the functions in a class is that db connection available in all the functions in the class?

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: php class question, clarification before coding


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: php class question, clarification before coding

    Thanks dude, trying to avoid the official php sites as quite often they confuse stuff even more

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width