how to get data from php to javascript 25 How To Get Data From Php To Javascript Step 2 — Using Fetch to get Data from an API. The following code samples will be based on the Random User API. Using the AP… Written By Anonymous Monday, November 19, 2018 Add Comment Edit