I’m running aquery with ajax, this is a part of it:
$count = mysql_query("SELECT COUNT(*) FROM Badges WHERE UID = '$user'");
$count = mysql_fetch_array( $count );
$count[0]
I want to get the value from $count[0] and asign it to a javascript variable so I can use it on my code. How can I do this?
have you try
json_encode()??this is how i used to be:
and in the javascript :