Test Your Knowledge

  1. What is the difference between a numeric and an associative array?

  2. What is the main benefit of the array keyword?

  3. What is the difference between foreach and each?

  4. How can you create a multidimensional array?

  5. How can you determine the number of elements in an array?

  6. What is the purpose of the explode function?

  7. How can you set PHP’s internal pointer into an array back to the first element of the array?

See Chapter 6 Answers in Appendix A for the answers to these questions.