I have an error in the functionsel_dr(x,y)
the error is in the second parameter I am sending it as an integer but I need to pass it as a string
$datos .= "<li onclick='sel_dr($(this).text(),".$sel['referencia'].")' >".$sel['referencia']."</li>";
I want to convert $sel['referencia']
to string
This is what is sent and it causes me an error
sel_dr($(this).text(),Doctor Gustavo Passos)
tiene que cambiar a esto:
sel_dr($(this).text(),'Doctor Gustavo Passos')
The problem is that you are only printing it with PHP, you need to wrap it in quotes outside the PHP code, so that when it is printed it is a string