Having created the controller and the model, you can proceed to create a view and give your application a face.
Go to the
<project-root>/module/Application/view/application/cooking
directory, create a new PHP file, and name itindex.phtml
.Phtml is a special extension used in the Zend framework that tells the web server that the expected content in the file will be more HTML and less PHP.
In other words, it is a way to tell the server that the file is a view component. Just as you have been doing all this while to create a view, you will take similar actions this time as well. After all, a view is a view.
You will create something like the following code:
<?php echo $this->doctype(); ?> <html lang="en"> <head> <?php echo $this->headTitle('Let us cook '.$dishname)->setSeparator(' - ')->setAutoEscape(false) ?> </head>
Now we've defined the title. Let's move to other parts of the code, which are...