First code in my Cognizant Life
I have been trained in so many technologies. At last i put up in one open source project. They asked me to work on php. Then i studied php.Yesterday i have a test on that(not a serious one).to test my php knowledge how much i understand php.The following is my first code i have written in my cogniant life(dont think this is done by me alone with the help of my team mates because i am not that much birllient). Dont think this is my project. i have been tested by one of my Associate because i am new to PHP.
I struggled a lot(nearly more than 5 hours) for writing this. but very very simple logic.
head_content=$head_content;
}
function body($body_content){
$this->body_content=$body_content;
}
function display_content(){
if(isset($_POST["submit"])) {
$this->display_body();
}
else
{
echo "$this->head_content
";
echo "$this->body_content
";
echo "$this->footer_content.$this->str
";
}
}
function display_body(){
?>
body_content;
?>
footer_content=$footer_content;
$this->str=$str;
}
}
$str="";
$header="This is header information";
$body="This is body of this page";
$footer="This is footer information";
$task=new myTask();
$task->headerr($header);
$task->body($body);
$task->footer($footer,$str);
?>
I struggled a lot(nearly more than 5 hours) for writing this. but very very simple logic.
head_content=$head_content;
}
function body($body_content){
$this->body_content=$body_content;
}
function display_content(){
if(isset($_POST["submit"])) {
$this->display_body();
}
else
{
echo "$this->head_content
";
echo "$this->body_content
";
echo "$this->footer_content.$this->str
";
}
}
function display_body(){
?>
body_content;
?>
footer_content=$footer_content;
$this->str=$str;
}
}
$str="";
$header="This is header information";
$body="This is body of this page";
$footer="This is footer information";
$task=new myTask();
$task->headerr($header);
$task->body($body);
$task->footer($footer,$str);
?>
