苏晓晓 发表于 2013-8-16 10:05:45

[编程题] php面试题

因为自己没有这方面的知识,就是这个php的题目:RecordBookThatPersonRead("John Smith", "Midsummer Night'sDream");$x->RecordBookThatPersonRead("Jane Doe", "War &Peace");$x->RecordBookThatPersonRead("John Smith","Freakonomics");$x->RecordBookThatPersonRead("Jane Doe", "Freakonomics");$x->RecordBookThatPersonRead("Jane Doe", "Bogleheads");$x->RecordBookThatPersonRead("John Smith", "War &Peace");$x->RecordBookThatPersonRead("Jane Doe", "Brave NewWorld");// This test code dumps out people and books they readecho "John Smith read:\n";var_dump($x->ReturnBooksReadByPerson("John Smith"));echo "Andy Warhol read:\n";var_dump($x->ReturnBooksReadByPerson("Andy Warhol"));echo "Jane Doe read:\n";var_dump($x->ReturnBooksReadByPerson("Jane Doe"));?>自己再w3school自学了一阵子php还是没有太明白,希望有同学可以给我一些php方面学习的资料,建议,多谢拉

王培培 发表于 2013-8-16 10:13:36

首先, RecordBookThatPersonRead 是一个class ,参数是 people ‘s name 和阅读的书名,在对象输入参数后会record 信息后面的方法 $x->ReturnBooksReadByPerson返回存储的用户和读书的信息并不难
页: [1]
查看完整版本: [编程题] php面试题