Php Function Within Function Javascript Practice Games