zaib Posted October 9, 2017 Share Posted October 9, 2017 I'm filtering result on the basis of multi select, see the code <div class="col-xs-12 col-sm-9"> <div class="tab-content"> <?php foreach($page->continents_1 as $continent){ $test = str_replace(' ', '', $continent->title); $get_countries = $page->find("template=t2Country, continents={$continent->title} "); foreach($get_countries as $country){ echo "<div class='$test tab-pane' id='$test'><span>$country->title</span></div>"; } } ?> </div> </div> if you see the image Europe is showing only "France" while if you see the developer tool img europe has more than one countries so it should be shown as Europe=>France,Spain,London, All data is coming but something wrong while filtering I'm mapping two fileds "Continents" and "countries" Any help would be appreciated. Thank you. Link to comment Share on other sites More sharing options...
BitPoet Posted October 9, 2017 Share Posted October 9, 2017 Move the output of the continent div tag (and its end tag) outside of the loop over its countries. 2 Link to comment Share on other sites More sharing options...
zaib Posted October 10, 2017 Author Share Posted October 10, 2017 @BitPoet Thank you my friend, it's working. Appreciated Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now