In the "JavaScript/PHP problem" thread somebody came up with a JS trouble. Starting from it I want to line up this one: JS or PHP. Or both of them? If yes, how? Your opinions will help all of us.
I "said":
My first observation: you are using a wrong syntax for calling the PHP variables: <?=MEAL_BREAKFAST?>;
The correct one is: <?=($php_variable)?>
paulnaj nelustr said ...
quote:
My first observation: you are using a wrong syntax for calling the PHP variables: <?=MEAL_BREAKFAST?>;
... but gazchap could have made these constants using the define() function.
Thanks! Could be or not
I just said that the syntax can be wrong. Nothing more.
And FYI, did you read the next statements:
Second one: Do not try to include php variables in JS. It doesn't work in this manner. You can use JS embeded like this:
....
So, I think that a new thread like "JS versus PHP" or "PHP versus JS) can help.
Best regards,
Nelu