I have few lines of code that I think will work normally in any language. But this is not working in PHP. In my case I want to print numbers in ascending order. The code I have written is below:
$i = 0;
printf("<p>Numbers in Ascending Order : ");
for (;++i <= 10;) {
printf("%3d", $i);
printf("\n\n");
}
But I get a syntax error which is given below:
Parse error: syntax error, unexpected '<=' (T_IS_SMALLER_OR_EQUAL), expecting
Why is PHP displaying an error message like this ?