1.How is it possible to get the value of id from inside h4 tag html. This id has a value of an integer as counter coming from my jquery
I need to pass the count to my php code to be like $c = chr(64 + value of id image-gallery-count)
I'm having trouble with this for almost a week now. Hope anyone code help me here. See my code below.$('#image-gallery-count').text($sel.data('count'));
<h4 id="image-gallery-count"></h4>
<?php $html = '<h4 id="image-gallery-count"></h4>';
$doc = new DOMDocument();
$doc->validateOnParse = true;
$doc->loadHTML($html);
$doc->preserveWhiteSpace = false;
$belement = $doc->getElementById('image-gallery-count');
echo $belement->nodeValue;
$xpath = new DOMXPath($doc);
$xpath->query("//*[@id='image-gallery-count']");
$c = chr(64 + value of id here);// I want to add the value id of <h4 id="image-gallery-count"></h4>
$b = chr(64 + 1);
?>