Jump to content

Recommended Posts

Подскажите пожалуйста в чем проблема?
Регулярка все у меня находит - в массиве тоже все показывается а 
вот при выводе не все данные выходят. 
Вывод на картинке. Допустим нет шкафов и зеркала

 

preg_match_all("/<img class=\'module_element_img\' id=\'img_\/\/([^'\s]+?)'/", $text,$matches11); // фото доп товаро
preg_match_all("/--> <img class=\'module_element_img\' id=\'scheme_\/\/([^'\s]+?)'/", $text,$matches22); // фото доп товаро
preg_match_all("/<b>([^><*]+)<\/b>/", $text,$matches2); // Наименование доп товаров
preg_match_all("/<\/b>([^>*<]+)x/", $text,$matches4); // ширина
preg_match_all("/x([^>*<]+), В/", $text,$matches5); // глубина
preg_match_all("/, В([^>*<]+)мм/", $text,$matches6); // высота
preg_match_all("/мм([^>*<]+)<br>/", $text,$matches7); // описание

// Для Mobi
for ($i=0; $i< count($matches[0]); $i++) {
	echo  "Главное - ".$matches[1][$i].';' ;
}
echo '<br>';
for ($i=0; $i< count($matches[0]); $i++) {
	echo  $matches2[1][$i].';'.$matches11[1][$i].';'.$matches22[1][$i].';'.$matches4[1][$i].';'.$matches5[1][$i].';'.$matches6[1][$i].';'.$matches7[1][$i].';<br>' ;
}

 

Screenshot (1).png

Share this post


Link to post
Share on other sites

вы форумом не ошиблись? )))

 

Share this post


Link to post
Share on other sites
Posted (edited)

может)

Edited by northboy87

Share this post


Link to post
Share on other sites
4 часа назад, northboy87 сказал:

может)

судя по скрину, у вас вордпресс, а это форум Opencart ))

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.