request('https://2ch.hk/b/',(error,response,body)=>{
const $ = cheerio.load(body)
const threadfind = $('blockquote')
if(threadfind && threadfind.text().includes('WEBM'))
{ // thread find blockquote
const threadid= threadfind.attr('id')
console.log(threadid)
}
})
<?php
$k=3;
$array = array(
'unused',
'first_element',
'second_element',
'third_element'
);
for ($i=1; $i<=$k; $i++) {
echo '<input type="text" name="'.$array[$i].'" onfocus="document.getElementById(\'divid\').innerHTML=this.value" onkeyup="this.onfocus()">';
}
?>
<div id="divid">
content1
</div>