0

The bolded line format is not correct... Anyone, please help me to solve this problem

$abc += '<div class="icon">'

$abc += '<i class="ion ion-person-add"></i>';

var php = '<?php echo DNS1D::getBarcodeHTML("4445", "C39") ?>';

$abc += php;

$abc += '</div>';

1 Answer 1

1

Short answer

you can not.

Long answer

You need to understand that PHP code is backend code and will only get executed by the server. While javascript code is frotend code and will only get executed by the browser.

A browser can not execute server code directly but ti can communicate with the server via HTTP requests.

I would recommend reading up on ajax

Sign up to request clarification or add additional context in comments.

2 Comments

So please tell me how can I append bar code in HTML ??
You can not again read up on ajax and how to have the frontend communicating with the backend eidt: I suppose you could use a frontend library that creates barcodes for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.