PHP - adding homework of lecture 6