How to output this code
<?php
class body{
public function index()
{
echo 'Hello World!';
}
}
?> How to output this code
<?php
class body{
public function index()
{
echo 'Hello World!';
}
}
?> $a = new body;
echo $a->index();
$object = new body; // create object class body
$object->index(); // method index # Sohel (15.12.2014 / 14:48)replace echo on return in method body
How to output this code
<?php class body{ public function index() { echo 'Hello World!'; } } ?>
Sohel, RTFM! And use http://phpbeautifier.com/, please. It will be easier to read your code, and more people be able to help you.