function parser($url) {
$html = getContent($url);
$doc = phpQuery::newDocument($html);
// вся таблица в одну строку - не очень удобно
//$tr[] = $doc->find('.index_table:eq(1) td')->text()/*->wrap('<span></span>')*/; // метод text() возвращает строку, у нее не вызовешь >wrap()
$table = [];
$i = 0;
foreach($doc->find('.catalog-items__col.js-item') as $rowNum => $product) {
$tr = pq($product);
$table[$i] = [
"img" => $tr->find('.catalog-plate__img')->attr('src'),
"name" => $tr->find('.catalog-plate__caption a')->text(),
"desc" => $tr->find('.catalog-plate__description ul')->html(),
"price" => $tr->find('.catalog-plate__current-price.js-price')->text()
];
$i++;
}
return $table;
}
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?>
<?
$counter = 0;
$mcounter = 1;
$markers = array();
?>
<?$tree = false?>
<?
$cur_sec = $arParams['CURRENT_SECTION_ID'];
$cur_item_id = isset($arParams['CURRENT_ITEM_ID'])? $arParams['CURRENT_ITEM_ID'] : null;
?>
<ul class="product-list categories_left">
<?
foreach ($arResult["SECTIONS"] as $arSection){
$arUF = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("IBLOCK_8_SECTION", $arSection['ID']);
?>
<? if ( $arSection["DEPTH_LEVEL"] == 2 or $arSection["DEPTH_LEVEL"] == 3 ){?>
<?if($arSection["DEPTH_LEVEL"] == 2){?>
<li class='level_<?=$arSection["DEPTH_LEVEL"]?>'>
<a <?if($arSection["ID"]==$cur_sec):?>class="active"<?endif;?> href="<?= $arSection["SECTION_PAGE_URL"] ?>">
<?= $arSection["NAME"] ?>
</a>
<?if($arSection['UF_ALOW_ITEM_SUBCAT'] == '1'){?>
<?if($arSection["ID"]==$cur_sec){?>
<? $arParams['params_for_items_component']['SECTION_ID'] = $arSection["ID"]; ?>
<? $arParams['params_for_items_component']['cur_item_id'] = $cur_item_id; ?>
<?$intSectionID = $APPLICATION->IncludeComponent(
"bitrix:catalog.section",
"catalog_menu_1fix_sub",
$arParams['params_for_items_component']
);?>
<?}?>
<?}?>
</li>
<?}?>
<?}?>
<?}?>
</ul>
<script type='text/javascript'>
$(document).ready(function(){
});
</script>
<style>
.twbs .col-md-6 {
width:55%;
}
</style>
Если вас не затруднит , скиньте статью почитать , про что вы говорите