output array from database to twig (simple job)

I have the following in my PHP file:

$sql = "SELECT id, email FROM users";

$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {

// output data of each row

while($row = mysqli_fetch_assoc($result)) {

$twig->addGlobal('users', $sql);

$twig->addGlobal('id', $row["id"]);

$twig->addGlobal('email', $row["email"]);

//echo "id: " . $row["id"]. " - Name: " . $row["email"]. " ";


} else {

echo "0 results";


and my twig file is

{% for id in users %}


<td>{{ id }}</td>

<td>{{ email }}</td>


{% endfor %}

The echo output works as expected however I can't seem to get the table to work

[login to view URL]

This is a quick job I will only pay AUD$10

Fähigkeiten: PHP, MySQL, SQL

Mehr darüber database management design job, simple job application, can form output access database, simple job applications, simple job scheduler, job status table sql 2000, html form output access database, need simple job, simple vbscript display table data sql server, resume database administrator sql job jobs, simple job application form html, freelance simple job, output pdf database, javascript array database, part time - simple clicking job - $10 per day *****, part time - simple clicking job - $10 per day, part time simple clicking job 10 per day, ***** PART TIME - Simple clicking job - $10 per day *****

Über den Arbeitgeber:
( 1 Bewertung ) DERBY, Australia

Projekt-ID: #21066943

13 Freelancer bieten im Durchschnitt $17 für diesen Job


Hello hiring member i am bhavika i have 3+years experience in php ,laravel , ajax , jquery , javascript ,html ,css , bootstrap i can solve this table fetching problem i have done many project so i can do it and i can Mehr

$10 AUD in 1 Tag
(132 Bewertungen)

Hello. I read your project fully and I can do it in a few hours. As you can see my profile, I have rich experiences in web. If you hire me, I will do my best and you will see successfully result. Please contact me. Ki Mehr

$20 AUD in 1 Tag
(31 Bewertungen)

Dear Client! I am very happy to see your project detail. I think it is just my project. :) As you can see in my profile, (my review: I have much experience with your job. I t Mehr

$20 AUD in 7 Tagen
(19 Bewertungen)

Dear client! I read your project details carefully. I am very interested in your project because I have vast experieces like that before. Frankly speaking, your task is piece of cake for me. As a senior full stack de Mehr

$50 AUD in 1 Tag
(14 Bewertungen)

you are doing [login to view URL] is with variable not the php.i am expert in twiging. I have more than 6 + years experience.

$20 AUD in 1 Tag
(38 Bewertungen)

Hi What is up ? I will fix it in a jiffy. No problem. Can i have your project detail ? Looking forward to your reply. Regards

$10 AUD in 1 Tag
(17 Bewertungen)

Hello! I have seen your project description. I will complete your project satisfactorily to your requirement. I can start work right away. I will be looking forward to hear from you. Thanks.

$10 AUD in 1 Tag
(22 Bewertungen)

Hi, I can help you to fix your PHP script in an hour. Let's have chat to discuss further on this project. Thanks, Sayan

$10 AUD in 1 Tag
(11 Bewertungen)

Hi. Sir I would be very glad to meet you. I read your description carefully. I can bring you perfect result as you want. I am an experienced web developer and designer with the depth knowledge related to PHP, Bootstrap Mehr

$20 AUD in 1 Tag
(5 Bewertungen)

Hello sir/madam , We have good experience of PHP,HTML,HTML5,CSS, Ajax,jquesry,JavaScript,Mysql, Graphic Design,Website Design, wordpress, open cart , E-commerce etc. Out recent work [login to view URL] Mehr

$10 AUD in 7 Tagen
(8 Bewertungen)

@ Dear Client. (24/7) I am very interested in your project. I have 7+ years experience in web & mobile development. I am well versed with HTML,CSS,JavaScript,Angular,PHP, Wordpress, Laravel, Mogodb,MySQL,Firebase..etc, Mehr

$10 AUD in 7 Tagen
(2 Bewertungen)

Dear Employer Thanks for submitting project. Very Short Introduction We are Professional Private Limited Company having international joint ventures and managing offshore companies in UK,USA Mehr

$20 AUD in 7 Tagen
(0 Bewertungen)

Dear Sir, We look your PPT file and we can do this task. we ready to make changes as per your requirement file. We work in all web frameworks, We have a 6 years of experience. Please ping me so that i can assist you f Mehr

$10 AUD in 1 Tag
(0 Bewertungen)