I\'m trying to populate a form with some data that contains special characters (e.g. single quote, double quote,<,>,?,\",\"\".~,,!@#$%^&*()_+}{\":?<<>,./;\'[.]
whats wrong with using a constant ?
,?,","".~,,!@#$%^&*()_+}{":?<<>,./;'); $foo2="'[.]"; echo constant('foo').$foo2; ?>
you need to put the '[.]' into a variable, as a constant will break on a ' (single quote).