Smaandar
Forum Replies Created
-
Forum: Hacks
In reply to: $25.00 turns into .00, Is something removing my punctuation and numbers?Oh, I had no idea it was using eval(), that makes a lot more sense now.
Thanks for your help.
Forum: Hacks
In reply to: $25.00 turns into .00, Is something removing my punctuation and numbers?The dollar sign indicates a variable declaration in PHP. Try the HTML character code $ instead.
Yes I know it’s a variable declaration. However, a line such as
echo("This cost $19.95");Should not declare a variable, it should simply be printing “This cost $19.95” without removing half of the value.
This works outside of WordPress, and as a custom page template. So I think it’s quite possible that it is something in the insert-php plugin that I was using.
Also, although it is resolved, I would like to note that I cannot use the html character code because it lists titles based on file names. If the file name has $30 in it, it will break the entire title.
So for now, the solution is to create a custom template file for the page, and include the script through the template php, and NOT from within WordPress through a third party plugin.
Forum: Hacks
In reply to: $25.00 turns into .00, Is something removing my punctuation and numbers?The only fix I’ve found is to make a custom page template for the page in question in Word Press, and put my php code into there.
The only fix I’ve found is to make a custom page template for the page in question in Word Press, and put my php code into there.
Forum: Hacks
In reply to: $25.00 turns into .00, Is something removing my punctuation and numbers?A bit of a good example.
[insert_php] echo "$25.00"; [/insert_php]prints “.00”
but
[insert_php] echo "25.00"; [/insert_php]Prints 25.00
If you didn’t want to concatanate strings, you could also just use:
echo 'line 1. <br /> line 2.';Yes it should be. I have a script running now that implements $_GET and never had any issues. 🙂