Use PHP to Create Dynamic JavaScript Values
One possible approach† to writing JavaScript on-the-fly I’ve been using something similar to the following in some apps for the purpose of including a sort of Dynamic JavaScript which, depending upon perhaps other variables or logical procedure, might easily be included or left out of any part of the web application. $js_array=array(); $js_array[‘open’]=”<script type=\”text/javascript\”> \n”;…