I have the following code which is part of a for loop. There are 2 arrays previously defined ($var, $bar):
[php]echo ( "<tr><td><input name=\"".$var[$i]."_guild_upgrade\" type=\"submit\" value=\"Level ".++$bar[$i]."\" /></td></tr>" ) ;[/php]
That works 100%. However that is not what I tired first. I was tring to do this:
[php]echo ( "<tr><td><input name=\"".$var[$i]."_guild_upgrade\" type=\"submit\" value=\"Level ".$bar[$i]+1."\" /></td></tr>" ) ;[/php]
This was coming up with a parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING?
Does anyone know why I can't use +1 instead of ++?