“意外的T_STRING”? [关闭]

echo "Info: <input type=\"text\" name=\"titel\"> value=\" . $row['titel'] . "\">" . "<br />";

Why is it showing:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/lokachan/public_html/andravisaform.php on line 24

This would save you typing

$input = "<input type=\"text\" name=\"%s\" value=\"%s\"><br \/>";

echo sprintf ( $input, "title1",$row ['titel'] );
echo sprintf ( $input, "title2",$row ['tite2'] );

You're missing a quote

echo "Info: <input type=\"text\" name=\"titel\"> value=\"" . $row['titel'] . "\">" . "<br />";

Change to:

echo "Info: <input type=\"text\" name=\"titel\"> value=\"" . $row['titel'] . "\">" . "<br />";

You're missing a " after a \".

I would prefer to write it as:

echo 'Info: <input type="text" name="titel"> value="' . $row['titel'] . '"><br />';

Now you don't need so many escapes.