So i have a php app I wrote which uses mysql for dynamic content. Anytime I put a dollar sign ($) in a table (it doesn't matter what the column type is VARCHAR, TEXT, LONGTEXT). When I try to output it to the screen the dollar sign doesn't show up but also eats the next two characters of the output. If i put a space after the dollar sign everything comes out ok.
instead of $139.99 i get 9.99
here is come sample code of the info I am retrieving from the db. The system uses templates and tokens for control. Could it be the regex that i am doing that is causing the errors? $body_text is the template with tokens in it and $this->answer and $this->question are the fields that have the dollar sign in them.
$body_text=preg_replace('{\%faq_id\%}',$this->id,$body_text);
$body_text=preg_replace('{\%faq_question\%}',nl2br($this->question),$body_text);
$body_text=preg_replace('{\%faq_answer\%}',nl2br($this->answer),$body_text);
return $body_text;