• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

107
Views
How to echo out php variable which is a div with multiple child div on specific id using JS or any other method?

I tried to echo out the divs on js such as

$("#id").append("<?php echo $var_with_multi_div;?>")

But since with div are printed on a new line the console gives error -

Uncaught SyntaxError: missing ) after argument list

So, how can I print the PHP variable on a specific element of the HTML page using JS? Is there any method to append as a child on an element without JS?

almost 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error