Characters disappearing after $

A multipurpose module, plugin and component

Characters disappearing after $

New postby [email protected] » Thu Sep 01, 2011 6:28 pm

I don't know if this is happening because of Jumi or some other reason. When I use this php line
echo "You have $", $Compbalance, " in Comp and ", $Pointbalance, " in points.";
The first two characters of the value of the variable $Compbalance do not get written to the html page. This also happens when I output a field from a table that includes a "$" in the value of the field. If the value of the field is "$500 in comp" the resulting output is "0 in comp".

Is this from the way jumi is interpreting the php code?

Mark
[email protected]
 
Posts: 1
Joined: Thu Sep 01, 2011 6:23 pm

Re: Characters disappearing after $

New postby [email protected] » Fri Oct 28, 2011 5:49 am

Hi,

You are not alone with this problem. I discovered the same bug.
I think is something to do with php, what tries to process the script's string in double quotes, and if in a string is something like '$X YZ', php takes $X like a variable which content is empty (not exist) and replace with 'nothing' and you'll get 'YZ'. What I did, I quoted all $ characters with '/'. So in your script file try to replace all '$' with '\$'.

Good luck.
[email protected]
 
Posts: 1
Joined: Fri Oct 28, 2011 5:43 am


Return to Jumi

Who is online

Users browsing this forum: No registered users and 2 guests