0

I have a PHP function which returns this :

echo '<li>Welcome back.</li>' I would like that echo to be appended to an existing div on the html called <div id="messages"></div>

Is there any way of doing this with just simple echo or I should use Jquery?

Thanks!

1 Answer 1

2

if you are using php all you can do is to run your function inside the div

<div id="messages">
    <?php run_function_here();?>
</div>
Sign up to request clarification or add additional context in comments.

Comments

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.