string and value concatenation to be assigned to a constant
Posted: Sat Feb 17, 2007 12:34 am
Dear all,
I have to replace a split string by a php constant; but the string has text part concatenated with value of the variables. If I assign the concatenated string to a php constant, it does not evaluate the variable value when displayed. eg:
res = confirm("The file at " + filename.value + "is added to project(<? echo $varProjname ?>)" );
is to be replaced as:
res = confirm(<? echo $CONST_WHOLE_STRING ?>);
But when I replaced as above, the variable does not get evaluated and gives error.
So please help me in solving this problem of replacing a concatenated string with a php constant.
thanks
buddha
I have to replace a split string by a php constant; but the string has text part concatenated with value of the variables. If I assign the concatenated string to a php constant, it does not evaluate the variable value when displayed. eg:
res = confirm("The file at " + filename.value + "is added to project(<? echo $varProjname ?>)" );
is to be replaced as:
res = confirm(<? echo $CONST_WHOLE_STRING ?>);
But when I replaced as above, the variable does not get evaluated and gives error.
So please help me in solving this problem of replacing a concatenated string with a php constant.
thanks
buddha