if inn_highlights3- find div class group1 div class intro foreach inn_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
if($inn_highlights3->find('div[class=group1] div[class=intro]')){
foreach($inn_highlights3->find('div[class=group1] div[class=intro] h3') as $title_intro){
$title_intro_clean = preg_replace('/ {2,}/',' ',$title_intro->plaintext);
//update_post_meta($post_info->ID,'intro_one_title',$title_intro_clean);
}
foreach($inn_highlights3->find('div[class=group1] div[class=intro] p') as $descript_intro){
$descript_intro_clean = preg_replace('/ {2,}/',' ',$descript_intro->plaintext);
//update_post_meta($post_info->ID,'intro_one_desript',trim($descript_intro_clean));
}
foreach($inn_highlights3->find('div[class=group1] div[class=intro] img') as $src_intro){
//скачиваем заглавное фото
$name_file_intro_img = preg_replace('|.*?/|sei','',$src_intro->{'data-original'});
$name_file_intro_img = str_replace('/','',$name_file_intro_img);
echo 'intro ';print_r($src_intro->attr)."\n";
sleep(1);
}
}