I'm running Apache 1.77, PHP 5.3.8 and obtain parsing errors on the simplest of variable assignments.
- Code: Select all
<?php
$quantity = 30;
$price = 119.95;
$taxrate = .05;
?>
results in:
Parse error: syntax error, unexpected T_DNUMBER in C:\xampp\htdocs\myphp\NumbersClip.php on line 3
Ok, perhaps someone can explain this to me:
The code not working is a cut and paste, not just here but into my php file. However, if I type the code into my notepad++ directly and run it then it works. I've even tried to run after saving in a 'cut and paste' to a windows notebook and I get parsing errors. I've tried cut 'n' paste of different code from different sources and get parsing errors, also on assignment variables. Anyone else had such problems ? I've even highlighted the code to look for training spaces, but find none.