<section class="pharmacy-mod hidden">
    <header>
        <h2><?= ucfirst($d['city']); ?> Night Pharmacies</h2>
    </header>
    <br>
    <?php
    $num = count($d['name']);
    for ($i = 0; $i < $num; $i++) {
    ?>
    <div class="box box-success pharmacy-box">
        <div class="box-body no-padding">
            <div class="pharmacy-name">
                <b><?= $d['name'][$i]; ?></b>
                        <span class="no-print pharmacy-icon pull-right text-success">
                            <i class="fa fa-plus-square fa-fw fa-2x"></i>
                        </span>
            </div>
            <div class="row">
                <div class="col-sm-5">
                    <div class="pharmacy-phones">
                        <i class="fa fa-plus-square fa-fw text-success"></i>
                        <?php
                        $pharmacy_phone = $d['phwork'][$i];
                        echo substr($pharmacy_phone, 0, 2)." ".substr($pharmacy_phone, 2, 3)." ".substr($pharmacy_phone,5);
                        ?>
                        <br><i class="fa fa-home fa-fw"></i>
                        <?php
                        $pharmacy_phone = $d['phhome'][$i];
                        echo substr($pharmacy_phone, 0, 2)." ".substr($pharmacy_phone, 2, 3)." ".substr($pharmacy_phone,5);
                        ?>
                    </div>
                </div>
                <div class="col-sm-5">
                    <div class="pharmacy-address">
                        <b><i class="fa fa-map-marker fa-fw"></i>  Address:</b> <br><?= $d['addr'][$i]; ?>
                    </div>
                </div>
            </div>

        </div>
    </div>


    <?php
    }
    ?>

</section>