P
P
Pavel Kostyukov2016-05-01 15:58:38
PHP
Pavel Kostyukov, 2016-05-01 15:58:38

How to populate JS object for Handlebars templating engine with data from PDO object?

Hey!
There is a table with data that is filled according to the Handlebars template from a JS object.
There is a database from which a selection is made via PDO into a php object - an associative array.
How to display data from a selection, according to data from a PDO object?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2016-05-02
@bingo347

On php - serialize data into JSON and send it to js
On js - parse JSON, give it to the template engine

P
Pavel Kostyukov, 2016-05-02
@PashtetForever

Thank you!
Can you provide examples of this connection?
How to pass data to JS?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question