Z </a> </li> </ul> </nav> </div> </header> <div class="container"> <div class="row"> <?php foreach ($providerCategories as $i => $providerCategory) { $providers = getProvidersByCategory($providerCategory->getIdProviderCategory()); ?> <div class="col-md-4"> <article> <h2> <?php echo $providerCategory->getCategoryName(); ?> </h2> <?php foreach ($providers as $j => $provider) { ?> <ul> <li> <?php echo $provider->getProviderName();
<?php require_once "_main4.php"; $providerCategories = getProviderCategoriesByFirstLetter($_GET['filter']); //var_dump($providerCategories); $html = ""; foreach ($providerCategories as $i => $providerCategory) { //var_dump($providerCategory); $providers = getProvidersByCategory($providerCategory["id_provider_category"]); if ($providers) { $html .= "<div class='col-sm-6 col-md-4'>\n\t\t\t\t <article>\n\t\t\t\t <h2>" . $providerCategory["category_name"] . "</h2>"; foreach ($providers as $j => $provider) { $html .= "<ul>\n\t\t\t <li>" . $provider["provider_name"] . "</li>\n\t\t\t\t <li>" . $provider["location"] . "</li>\n\t\t\t\t <li>" . $provider["phone"] . "</li>\n\t\t\t\t <li><a href='#'>" . $provider["website"] . "</a></li>\n\t \t\t</ul>"; } $html .= "</article></div>"; } } echo json_encode(array("status" => 1, "html" => $html));