Hello, I contacted one problem. From JS, I have a number in the DIV block and I need to insert into the variable the value that I put in the DIV
<div id='iidd'>12</div> PHP:
$id = #iidd; //сюда нужно вывести число из div блока I tried to do this:
$ids = "<div id='iidd'></div>"; $idssd = htmlspecialchars($ids); $id = preg_replace('/[^0-9]/', '', $idssd); But the problem occurs when $ idssd, it does in html, but the number from JS, which outputs to the div does not bring with it. Displaying just $ ids displays the number, but in additions with this, and in the variable $ id you only need the number
$("#div").text(id);(id - in a variable), html:<div id="div"></div>- Sasha Osipovphp. When inserting a value into adivusingjshow do you pass it tophp? - x_ror