Chapter 1

Fetching Data with PHP, JavaScript, and JSON

IN THIS CHAPTER

Bullet Dealing with asynchronous operations

Bullet Making sense of the Fetch API

Bullet Loading server data into a page element

Bullet Sending data to and receiving data from the server

Bullet Using JSON to work with complex data from the server

The Fetch API is a game-changer for developers, giving them unparalleled flexibility … to easily and quickly make URL requests from your browser.

— DANIELLE ELLIS

When coding web pages, it feels like there’s a great divide between the browser front end and the server back end. When you’re working on the front end, you can use HTML tags, CSS properties, and JavaScript code to build, style, and animate your pages. When you’re working on the back end, you can use MySQL and PHP code to define, access, and manipulate data. That all works, but front-end code without back-end data produces a lifeless page, whereas back-end data without front-end code produces useless information.

To create a truly dynamic web ...

Get Web Coding & Development All-in-One For Dummies, 2nd Edition 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.