sihl Posted February 24, 2010 Share Posted February 24, 2010 Can I get some help fixing this line? The error message I get is "Parse error: syntax error, unexpected '=', expecting ',' or ';' in C:\xampp\xampp\htdocs\vote\functions.php on line 196" echo $value[1]." x <a class=\"q".$value[3]."\" href=\"javascript:;",onmouseover="$WowheadPower.showTooltip(event, '.$value[4].', '.$value[5].')" onmousemove="$WowheadPower.moveTooltip(event)" onmouseout="$WowheadPower.hideTooltip();""\">".$reward_texts[$langs[$set_lang][2]][$key]."</a>"; Thanks Link to comment https://forums.phpfreaks.com/topic/193204-help-fixing-this-line/ Share on other sites More sharing options...
laPistola Posted February 24, 2010 Share Posted February 24, 2010 Try <?php echo $value[1]." x <a class=\"q".$value[3]."\" href=\"javascript:;\" onmouseover=\"".$WowheadPower."showTooltip('event', '".$value[4]."', '".$value[5]."') onmousemove=\"".$WowheadPower."moveTooltip(event)\" onmouseout=\"".$WowheadPower."hideTooltip();""\">".$reward_texts[$langs[$set_lang][2]][$key]."</a>"; ?> Link to comment https://forums.phpfreaks.com/topic/193204-help-fixing-this-line/#findComment-1017373 Share on other sites More sharing options...
developerdave Posted February 24, 2010 Share Posted February 24, 2010 echo "{$value[1]} x <a class=\"q{$value[3]}\" href=\"javascript:;\",onmouseover=\"{$WowheadPower}.showTooltip(event, '.$value[4].', '.$value[5].')\" onmousemove=\"$WowheadPower.moveTooltip(event)\" onmouseout=\"{$WowheadPower}.hideTooltip();\"\>{$reward_texts[$langs[$set_lang][2]][$key]}</a>"; Loads of missing \ and I encapsulated the variables a little better Link to comment https://forums.phpfreaks.com/topic/193204-help-fixing-this-line/#findComment-1017374 Share on other sites More sharing options...
sihl Posted February 24, 2010 Author Share Posted February 24, 2010 Now I get the error "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\xampp\xampp\htdocs\vote\functions.php on line 196" Any ideas? Link to comment https://forums.phpfreaks.com/topic/193204-help-fixing-this-line/#findComment-1017375 Share on other sites More sharing options...
sihl Posted February 24, 2010 Author Share Posted February 24, 2010 Ah thank you dave. That worked Link to comment https://forums.phpfreaks.com/topic/193204-help-fixing-this-line/#findComment-1017377 Share on other sites More sharing options...
developerdave Posted February 24, 2010 Share Posted February 24, 2010 Hehe encapsulation for the win Anytime Link to comment https://forums.phpfreaks.com/topic/193204-help-fixing-this-line/#findComment-1017378 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.