0

The code is:
echo " AS " . $index - 10 . " - " . $index . " SA ";

$index is an integer.

The output is:
-10 - 0 SA

The expected output is:
AS -10 - 0 SA

What am I missing?

Edited by A_6

3
Contributors
4
Replies
23
Views
1 Year
Discussion Span
Last Post by cereal
0

Yea well that works. But why does it happen? Is my syntax incorrect? Is there a rule you can't put words before mathematic operation?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.