Create chapter2.php

code for chapter 2