mail4kaja
01-12-2006, 11:33 AM
Hello......
I'm writing a PHP code that gives an JavaScript as output. That JavaScript takes two inputs. The results obtained from some manipulation using PHP is wrapped by these two strings. Then my site name is printed. Now my problem is I have to eliminate the comment start symbol (<!--) in the seond input string as this may cause my site name to be commented and NOT displayed. How can I find & eliminate an unpaired comment start symbol?
If any full comment is given in the string i.e., for example
String 1: Some text
String 2: Some text <!-- Some Comment --> <!-- Some Text
the Paired (Closed Comment) should not be eliminted only the last <!-- should be eliminated.
Please help me how to do this....
R. Kaja Mohideen
http://mymail.xmgfree.com/
I'm writing a PHP code that gives an JavaScript as output. That JavaScript takes two inputs. The results obtained from some manipulation using PHP is wrapped by these two strings. Then my site name is printed. Now my problem is I have to eliminate the comment start symbol (<!--) in the seond input string as this may cause my site name to be commented and NOT displayed. How can I find & eliminate an unpaired comment start symbol?
If any full comment is given in the string i.e., for example
String 1: Some text
String 2: Some text <!-- Some Comment --> <!-- Some Text
the Paired (Closed Comment) should not be eliminted only the last <!-- should be eliminated.
Please help me how to do this....
R. Kaja Mohideen
http://mymail.xmgfree.com/