Question:What is the correct syntax for a Controller? 

A [code] <?php class HelloWorld extends Controller { function HelloWorld(){ parent::Controller();   } function index(){ echo("Hello, World!"); } } ?> [code] 

B 
<?php
class Helloworld extends Controller
{
  function HelloWorld(){
    parent::controller();
  }

  function index(){
   echo("Hello, World!");
  }
}
?>
 

C 
<?php
class Helloworld extends Controller
{
   function HelloWorld(){
     parent:Controller();
   }

   function index(){
    echo("Hello, World!");
  }

}
?>
 

D 
<?php
class Helloworld extend Controller
{
  function HelloWorld(){
   parent::Controller();
 }
 function index(){
  echo("Hello, World!");
 }
}
?>
 

+ Answer
+ Report
Total Preview: 1345

Copyright © 2024. Powered by Intellect Software Ltd