PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
And where is varname coming from?
I'm just trying to get at why there's a strange char/control char in there, the 'Â' bit. If you manually set $var = '£'; the the preg_match works ok too, so just trying to work backwards to find the root of the problem
here's the code... if you print $short or $long before the last preg_replace calls it definatly HAS the £ sign in there (if you pass it in one of the request vars)... but no replacing takes place :\
Well, still sounds like something dodgy in the input, ie the original $_REQUEST vars, so maybe var_dump($_REQUEST); and see what the original values coming in are.
I'm not sure why you're using those preg_replace lines any way and not just nl2br() and str_replace() ?
after long searching... i found a hex value for the pound sign which actually worked... tried some that some sites said was the right one but wasn't...