echo "<tr><td><input type = 'button' value = 'Agregar' onclick = 'addrow($leaguesarray[$numofleagues])' /></td></tr></table><br />\n";
I have the above php code which is failing to call the addrow function I’m pretty sure its because of my quutoes.
echo "<tr><td><input type = 'button' value = 'Agregar' onclick = 'addrow('5a7')' /></td></tr></table><br />\n";
This also gives me errors I don’t understand whats going on please help.
Escape the single quotes inside that function call:
With a PHP Var: