In the database I have a column that receives strings in this format: ["87", "12", "67"]
What I need is to count each value separated by a comma and assign it to some variable, remembering that there are more rows. In this case I would have a variable with a value of 3.
My code has not evolved much, but I believe this is the path:
$conexao = mysqli_connect('localhost','root','');
$banco = mysqli_select_db($conexao,'bd');
mysqli_set_charset($conexao,'utf8');
$res = mysqli_query($conexao,"SELECT replace(replace(coluna,'[',''),']','') FROM tabela");
$var = array($res);
echo count($var);
I count on the help of the community.