echo"<div class='btn-likes'><input type='button' title='".ucwords($str_like)."' class='".$str_like."' onClick='addLikes(".$tutorial['id'].",".$str_like.")' /></div>";
Output from above code is :
<input title="Like" class="like" onclick="addLikes(51,like)" type="button">
Output what I want is :
<input title="Like" class="like" onclick="addLikes(51,'like')" type="button">
apostrophe is missing in onclick="addLikes(51,'like')"
I have try :
echo"<div class='btn-likes'><input type='button' title='".ucwords($str_like)."' class='".$str_like."'
onClick='addLikes(".$tutorial['id'].",'".$str_like."')' /></div>";
And the output is so viewy :
<input title="Like" class="like" onclick="addLikes(51," like')'="" type="button">
Anyone can help me ?