initiated foreach books file
created book foreach loop to iterate and echo details of array
will only print details of books published after 1950