https://github.com/chadnpc/php-data-in-javascript
Different ways of how to pass data from PHP to JavaScript.
https://github.com/chadnpc/php-data-in-javascript
Last synced: over 1 year ago
JSON representation
Different ways of how to pass data from PHP to JavaScript.
- Host: GitHub
- URL: https://github.com/chadnpc/php-data-in-javascript
- Owner: chadnpc
- License: mit
- Created: 2023-04-30T17:32:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T08:59:35.000Z (about 3 years ago)
- Last Synced: 2025-02-10T01:31:39.735Z (over 1 year ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Use PHP data in Javascript
Different ways of how to pass data from PHP to JavaScript.
## Description
Assume you have a variable in PHP on the server that needs to be used in Javascript on the browser.
The goal is to locate What is the most effective method to use? a solution that is scallable and efficient.
## Results
There are several ways you may use to do this:
* Use PHP short echo tags
* Use
## Run
```bash
php -S localhost:4000
```