T
T
TjLink2018-07-24 22:32:29
PHP
TjLink, 2018-07-24 22:32:29

How to link data from phpMyAdmin to TWIG templating engine?

I am learning PHP and TWIG templating engine.
I am making an admin panel for the site, linking it to phpMyAdmin:
Add/Delete/Change data, etc.
The database consists of many tables.
I want to link the data that is requested from phpMyAdmin to the TWIG templates that make up the main site, as shown below.
Piece of code:

{% for school in items %}
    <div class="bl_contact">
      <div class="left_colom">
        <div class="icon_mape"></div>
        <a href="/filialy/{{ school.url_school }}/"><span><b>м. {{ school.metro }}</b></span></a>
        <p>{{ school.address }}</p>
      </div>
      <div class="right_colom">
        <div class="icon_phone"></div>
        {{ school.phones }}
      </div>
    </div>
{% endfor %}

I've looked all over the internet and haven't found anything.
Help out :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2018-07-25
@Eugeny1987

You need an ORM and a QueryBuilder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question