calling a function in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeni
    New Member
    • Aug 2006
    • 5

    calling a function in php

    can we call a function b() in a class B from a function a() in another classA in PHP
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Yes

    And here are some characters because otherwise the message is too short

    Comment

    • jeni
      New Member
      • Aug 2006
      • 5

      #3
      how to achive this in php?

      Comment

      • Devendra
        New Member
        • Aug 2006
        • 12

        #4
        <?
        class A
        {
        function AA()
        {
        echo 'Hi Jeni';
        }
        }

        class B extends A
        {

        }

        $a = new B();
        $a->AA();
        ?>

        Comment

        • jeni
          New Member
          • Aug 2006
          • 5

          #5
          thanks!!! Is there any other way..like including the class which has the function b() to be called in a php file, which has the functiona() which calls the functionb()

          Comment

          Working...