Parse error: syntax error, unexpected T_STRING in line 66
Moderator: General Moderators
Parse error: syntax error, unexpected T_STRING in line 66
$out = '<input name="mass_action" type="submit" value="'."{"Move"}".'" class="button"> '."{"to"}".': <select name="move_to">';
try this:
Code: Select all
$out = "<input name='mass_action' type='submit' value='"."{'Move'}"."' class='button'> "."{'to'}".": <select name='move_to'>";ok here ill send 5 lines so you can see a little better
}
else{
$out = '<input name="mass_action" type="submit" value="'."{"Move"}".'" class="button"> '."{"to"}".': <select name="move_to">'; <<<<<<<<<<<<<<that is line 66
$out .= "<option value=\"\">{}</option>";
while($res = $sql->fetch(MYSQL_ASSOC)){
$out .= "<option value=\"{$res['id']}\">{$res['name_en']}</option>";
}
else{
$out = '<input name="mass_action" type="submit" value="'."{"Move"}".'" class="button"> '."{"to"}".': <select name="move_to">'; <<<<<<<<<<<<<<that is line 66
$out .= "<option value=\"\">{}</option>";
while($res = $sql->fetch(MYSQL_ASSOC)){
$out .= "<option value=\"{$res['id']}\">{$res['name_en']}</option>";
Code: Select all
$a = 'abc' . 'xyz';
echo $a, "<br />\n";
// you get the same result with
$a = '';
$a .= 'abc';
$a .= 'xyz';
echo $a, "<br />\n";Code: Select all
/*
before:
$out = "<input name='mass_action' type='submit' value='"."{'Move'}"."' class='button'> "."{'to'}".": <select name='move_to'>";
after: */
$out = '';
$out = '<input name="mass_action" type="submit" value="';
$out .= "{"Move"}"; // <- see the problem here?
$out .= '" class="button"> ';
$out .= "{"to"}"; // <- and here?
$out .= ': <select name="move_to">';/*
$out = "<input name='mass_action' type='submit' value='"."{'Move'}"."' class='button'> "."{'to'}".": <select name='move_to'>"; */
$out = '';
$out = '<input name="mass_action" type="submit" value="';
$out .= "{"Move"}";<<<<<<<<<<<<<<<<<<<<< there is line 70
$out .= '" class="button"> ';
$out .= "{"to"}";
$out .= ': <select name="move_to">';
$out .= "<option value=\"\">{}</option>";
is this how it should look now its saying line 70
$out = "<input name='mass_action' type='submit' value='"."{'Move'}"."' class='button'> "."{'to'}".": <select name='move_to'>"; */
$out = '';
$out = '<input name="mass_action" type="submit" value="';
$out .= "{"Move"}";<<<<<<<<<<<<<<<<<<<<< there is line 70
$out .= '" class="button"> ';
$out .= "{"to"}";
$out .= ': <select name="move_to">';
$out .= "<option value=\"\">{}</option>";
is this how it should look now its saying line 70
/* */ marks a comment, it's not executed.
My question was about the line
If you begin a string literal with a double-quote it tesll php: the string literal ends right before the next (unescaped) doblue-quote
You have the string "}" followed by Move and php does not know what Move means.
My question was about the line
Code: Select all
$out .= "{"Move"}";You have the string "}" followed by Move and php does not know what Move means.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
are Move and to variables? if so:
Code: Select all
$out = '<input name="mass_action" type="submit" value="'.$Move.'" class="button"> '.$to.': <select name="move_to">';