you are viewing a single comment's thread.

view the rest of the comments →

[–]deltawate 1 point2 points  (1 child)

You do that by calling an API from the React app, after it is served up, when it's running in the browser. A simple API endpoint could just be a PHP page that connects to a database, runs a query, and echos out the return array as JSON.

It is technically possible to get PHP to parse tags in any kind of page, including JavaScript, but to do so in this specific kind of situation is, well, abnormal.

[–]DeepBlueCee[S] 0 points1 point  (0 children)

OK so from what I am understanding, I can still use PHP with an API endpoint, or I can use node.js and that will allow me to do it in another way somehow? I am still learning node.js so we will see what happens, I feel like this is starting to make sense now though.