There is a div with a class of container and I need to add PHP code at the end. Is it possible to do this with jQuery?
3 answers
- You write absurd things!
- I think not.
|
It is impossible to add the PHP code.
You see, PHP is a server language, that is, the client comes to the browser only the "finished" page. javaScript is a client language, that is, all work is done only with the page that is in the browser.
In your case, the best option is Ajax. That is, using the javaScript language, you access a PHP script on the server and get a ready-made answer, and you can paste this “answer” at the end of the page.
|
Can so
<?$KtoZdes = "Здесь Скоро Будет Город-Сад";?> <script> jQuery("#...").html("<?=$KtoZdes?>"); </script>; - Please try to write more detailed answers. I am sure the author of the question would be grateful for your expert commentary on the code above. - Nicolas Chabanovsky ♦
|