Archive for May, 2007


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";
$js_array['hideManForm']="function hideManForm(obj) { [...]

PHP String Variables:
To Quote… or Double Quote?

…that is the question.
Oftentimes i find myself faced with a situation wherein I must decide whether to use PHP’s single or double quotes. If you’re not aware of it by now, then you should STOP everything and go learn a bit about the differences between the two: a single-quoted string, vs a double-quoted string– and [...]

BACK TO TOP [ javascript enabled ]