I have working code I developed for a linux server that when I have tested locally using WAMP have started to get strange Xdebug errors of the form
Notice: Use of undefined constant fullName - assumed 'fullName'
The code is…
$allVars = array(
fullName=>$fullName,
telephone=>$telephone,
email=>$email,
fAddr=>$fAddr,
tAddr=>$tAddr,
sngRtnSelect=>$sngRtnSelect,
oDate=>$oDate,
rDate=>$rDate,
tAdditional=>$tAdditional,
noPassengers=>$noPassangers,
vehicleType=>$vehicleType,
distance=>$distance,
priceTot=>$finalPrice
);
I thought the above was a straight forward array definition. Could anyone shed light on why such errors are appearing on WAMP and not the linux server?
If I have missed something obvious, then my apologies, however this is the identical code that worked on the linux/apache server. Thanks.
If you are defining a string key then you should put it inside quotes. Like this:
However, when you are working with integers you should not use quotes, otherwise you’ll create a string.
By the way, when you do not use quotes for a string value, it means that you refer to a defined variable.