Welcome to WebmasterWorld Guest from 220.127.116.11
Parse error: parse error, expecting `','' or `';'' in /usr/local/slash/apache/vhosts/bestevanhetnet.nl/httpdocs/test/test-header.php on line 8
what am i dooing wrong? shou;d i use the 'subpage' variable instead? or is it a obvous problem?
i don't want to programm a lot php, i just need this line.
I- echo "<title>".$sub."title</title>";
II- echo "<title>$sub title</title>";
When you use quotes to echo a string, you have to concatenate (?) the next quotes or variables with a period, like in example I.
Another way is putting the variable inside the quotes, like in example II. Although sometimes, you can't or shouldn't put a variable inside quotes.
Why commas instead of a period? Not sure I understand that.
With commas, it's a list of arguments to 'echo'. With periods, the argument to 'echo' is a single string, which is the result of multiple string concatenations. The end result is the same, but the list of arguments is processed more efficiently.