Outputting Javascript from PHP?
Posted
by Aristotle
on Stack Overflow
See other posts from Stack Overflow
or by Aristotle
Published on 2010-03-21T06:33:18Z
Indexed on
2010/03/21
6:41 UTC
Read the original article
Hit count: 477
php
|JavaScript
Are there any libraries or tools specifically designed to help PHP programmers write Javascript? Essentially, converting the PHP logic into Javascript logic. For instance:
$myFoo = $document->getElementById("foo");
$myFoo->value = "Hello World";
Being converted into the following output:
var myFoo = document.getElementById("foo");
myFoo.value = "Hello World";
Of course it would be excellent if more complicated solutions could be derived too, perhaps converting objects and internal methods into javascript-objects, etc.
© Stack Overflow or respective owner