Using MongoDB with PHP

PHP continues to be one of the most commonly used scripting languages used in developing web sites. The PHP Driver for MongoDB may be used to connect to MongoDB, and create a collection and perform CRUD (Create, Read, Update, Delete) operations on the database. The PHP driver extension dll is not packaged with the PHP download but is required to be added and configured. In this chapter we shall use the PHP Driver for MongoDB to connect to MongoDB database server and add, find, update, and delete data from the server. This chapter covers the following topics:

  • Getting Started
  • Using Collections
  • Using Documents

Get Pro MongoDB™ Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.