on battle.php, at end, where it should be "Attack" I have this:
Attack!d»z
So I dont know where this d»z came from or how to remove it... everything works fine, but it bugs me to see it
Here is how code looks like (but I doubt it is about the actual code...)
echo "<a href='attack.php?creature=$creature'>Attack!";
What am I missing?
Strange letter on battle.php
Re: Strange letter on battle.php
Change the double quotes to single so any hidden characters don't get rendered?
Re: Strange letter on battle.php
When I change to single qoutes like this:
echo '<a href='attack.php?creature=$creature'>Attack!';
I get error:
Parse error: syntax error, unexpected 'attack' (T_STRING), expecting ',' or ';' in /home/vhosts/mojaigra.orgfree.com/battle.php on line 56
echo '<a href='attack.php?creature=$creature'>Attack!';
I get error:
Parse error: syntax error, unexpected 'attack' (T_STRING), expecting ',' or ';' in /home/vhosts/mojaigra.orgfree.com/battle.php on line 56
Re: Strange letter on battle.php
you need to escape the singles in the html line and render the variable outside the string - single quotes aren't put through the parser:
echo '<a href=\'attack.php?creature=' , $creature, '\'>Attack!';
echo '<a href=\'attack.php?creature=' , $creature, '\'>Attack!';
Re: Strange letter on battle.php
I change reference like you said and still have d»z at end.
Re: Strange letter on battle.php
Looks like a byte order mark (BOM). It's being added by your editor so check your file encoding settings.