don't hesitate to try it
echo "<table width="100%" cellspacing="0" cellpadding="0" border="0">";
if you start a string literal with a double quote php will parse anything up to next double quote as contents of the literal, but it will stop at the next ", so you will get a parse error. Take a look at the colors the syntax highlighter uses here
Code: Select all
echo "<table width="100%" cellspacing="0" cellpadding="0" border="0">";
echo "<tr>
<td> tabel siruri:</td>
</tr>";
echo "<tr>
<td> $sir0</td>
</tr>";
echo "$sir1<br>";
echo "$sir2<br>";
echo "$sir3<br>";
echo "$sir4<br>";
echo "$sir5<br>";
echo "$sir6<br>";
echo "$sir7<br>";
echo "$sir8<br>";
echo "$sir9<br>";
?>
As you can see the % of
width="100%" has the same colour as the php-
function echo, unlikely that this is correct

But you can escape the special meaning of a character with backslashes; compare
Code: Select all
echo "<table width="100%" cellspacing="0" cellpadding="0" border="0">";
echo "<tr>
<td> tabel siruri:</td>
</tr>";
echo "<tr>
<td> $sir0</td>
</tr>";
echo "$sir1<br>";
echo "$sir2<br>";
echo "$sir3<br>";
echo "$sir4<br>";
echo "$sir5<br>";
echo "$sir6<br>";
echo "$sir7<br>";
echo "$sir8<br>";
echo "$sir9<br>";
?>
Now all string literals are monocoloured, as they should..
If you think this looks ugly I totally agree. If you do not need substitutions (like echo "and the winner is: $winner"; ) you can use single quote as delimeter
Code: Select all
echo '<table width="100%" cellspacing="0" cellpadding="0" border="0">';
echo '<tr>
<td> tabel siruri:</td>
</tr>';
echo "<tr>
<td> $sir0</td>
</tr>";
echo "$sir1<br>";
echo "$sir2<br>";
echo "$sir3<br>";
echo "$sir4<br>";
echo "$sir5<br>";
echo "$sir6<br>";
echo "$sir7<br>";
echo "$sir8<br>";
echo "$sir9<br>";
?>
there are some other styles but I think this should do for now
