List: I don't mean to get greedy, but...
using this method, would it be possible to get data from a database into javascript? for example, I create a php script with a function (say the function name is Query) that queries the database and returns a value. then in javascript I say: var this = "<?php $value = Query(); echo $value; ?>"; this should work, shouldn't it? Thanks again Merrill On Wed, Jan 19, 2011 at 11:27 AM, Wade Preston Shearer <[email protected]> wrote: > On 19 Jan 2011, at 11:21, Merrill Oveson wrote: > >> I have an app_constants.php file in the includes directory. >> >> I have another php files that reads the constants from this file. >> This other php file also have javascript in it. >> >> Is it possible to have the javascript read the constant variables in >> the app_constants.php file? > > If you javascript (or at least part of it) is written out by PHP then yes, > you can write out: > > var this = "<?php echo CONTSTANT: ?>"; > > _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
