<?php
/**
 * Template Name: Cities
 */
get_header();
?>

<div id="Content">
	<div class="content_wrapper clearfix">

		<div class="sections_group">

			<div class="entry-content" itemprop="mainContentOfPage">

				<?php
					while (have_posts()) {

						the_post();

						$mfn_builder = new Mfn_Builder_Front(get_the_ID());
						$mfn_builder->show();

					}
	
				
				$url= "http://cod.callcourier.com.pk/API/CallCourier/GetCityListByService?serviceID=7";
				$response = file_get_contents($url);
				$response = json_decode($response);
				for($i = 0; $i < count($response); $i++) {
					foreach ($response[$i] as $key => $value) {
						// echo $key." : ".$value;
						if ($key=="CityName") {echo $value.", ";}
						if ($key=="ProvinceName") {echo $value."<br />";}						
					//	echo "<br />";
					}
				}
				
				?>

			</div>

			<?php if (mfn_opts_get('page-comments')): ?>
				<div class="section section-page-comments">
					<div class="section_wrapper clearfix">

						<div class="column one comments">
							<?php comments_template('', true); ?>
						</div>

					</div>
				</div>
			<?php endif; ?>

		</div>

		<?php get_sidebar(); ?>

	</div>
</div>
<?php get_footer();
