I am sorry the last example doesn't work, if you want to pass a variable from javascript to PHP, you need to write everything on PHP, then pass the javascript variable with >> window.location.href , then get it with PHP.
I am sorry the last example doesn't work,
<?php
if($_GET['lemonk_include']=="0"){
echo ("<script type='text/javascript' src='../js/jquery-1.3.2.js'></script>");
}
else{
echo ("<script language='javascript' type='text/javascript'>");
echo ("if(typeof jQuery != 'function'){window.location.href = location.href + '&lemonk_include=' + '0';}else{}");
echo ("</script");
}
?>
This is also for detecting if JQuery was detected, if not, it will be included once.