I'm trying to change the string value of a javascript string to integer. Let me explain: I have a variable PHP $ length and a variable Javascript var arrayValuesSubcategoria ...
<?php $longitud = (int) "<script>document.write(arrayValoresSubcategoria.length);</script>"
var_dump($longitud);?>
What it throws is int (0) in my attempt to convert it to integer, because it seems that it reads the complete string "<script>...</script>"
which is about 70 characters but when converting it to integer that too much its length.
Do you have any idea how to convert it to int / integer?