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)
How to output this code
<?php
class body{
public function index()
{
echo 'Hello World!';
}
}
?>
replace echo on return in method body
Sohel,
RTFM! And use
http://phpbeautifier.com/, please. It will be easier to read your code, and more people be able to help you.