so I have this PHP code, printing html tables with a button in a for loop:
echo "<table><td>".$tablica[$i]['nazwa']."</td>
<td>".$tablica[$i]['koszt']."</td>
<td><button onclick='addDiv()'>ADD</button></td>
</table>";
addDiv is a javascript function, and I want to pass a string as an argument to it (preferably from php variable). It works fine without arguments, or with numeric arguments, but single quotes required by JS for string argumnents mess up whole thing.
Cheers, Amano