<?php
 require_once("common_slug_functions.php"); // ✅ added 
require_once("blog.php"); ?>

<!doctype html>

<html lang="en">

<head>

<title>Blog - TESOL Course India</title>

<meta name="title" content="Blog - TESOL Course India"/>

<meta name="description" content="Read the exclusive blogs of the Asian College of Teachers. Explore various important, helpful and exclusive guides to know more."> 

<?php include("common/header-script.php"); ?>

<link rel="canonical" href="https://www.tesolcourseindia.com/blog/" />

<!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-81276558-1"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

 

  gtag('config', 'UA-81276558-1');

</script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YDKM92SL12"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-YDKM92SL12');
</script>

</head>

<body>

<!-- HEADER -->

  <?php include("common/header.php"); ?>

<!-- HEADER END --> 

    <!--====== PAGE BANNER PART START ======-->

    

      <section class="hero-wrap hero-wrap-2" style="background-image: url('../images/ecce.jpg');">

      <div class="overlay"></div>

      <div class="container">

        <div class="row no-gutters slider-text align-items-center justify-content-center">

          <div class="col-md-9 ftco-animate text-center">

            <span class="my-2 bread" style="font-weight:bold;font-size:30px;">Blog</span>

            <p class="breadcrumbs"><span class="mr-2"><a href="https://www.tesolcourseindia.com/">Home <i class="ion-ios-arrow-forward"></i></a></span>| <span>Blog <i class="ion-ios-arrow-forward"></i></span></p>

          </div>

        </div>

      </div>

    </section>

    

    <!--====== PAGE BANNER PART ENDS ======-->

<section class="inn-body">

<div class="container">

<div class="row">

<div id="content-area" class="col-md-8">

<!--<h2 class="sub-title" style="margin:0px 0px 15px"> Blogs </h2>-->

<?php  for($i=0; $i<$no_of_blogs; $i++)  {  ?>

  <div style="padding: 10px 20px; margin: 20px 0px;border: 2px inset #000;">

	<?php $blog_title_org[$i] = $blog_title[$i];

  /* ✅ REPLACED ALL str_replace WITH FUNCTION */
    $blog_title[$i] = createSlug($blog_title[$i]);

	  // $blog_title[$i] = str_replace(" ","-",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("?","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("!","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("'","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace(":","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace(";","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("’","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("_","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("–","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("/","",$blog_title[$i]); 

	  // $blog_title[$i] = str_replace("&","-",$blog_title[$i]); 

	  // $blog_title[$i] = str_replace("(","",$blog_title[$i]); 

	  // $blog_title[$i] = str_replace(")","",$blog_title[$i]); 

	  // $blog_title[$i] = str_replace(",","",$blog_title[$i]);

	  // $blog_title[$i] = str_replace("”","",$blog_title[$i]); 

	  // $blog_title[$i] = str_replace("“","",$blog_title[$i]);?>

    

	  <h1 class="sub-title" style="color:#235892;font-size:20px;margin:0px 0px 15px"><a href="<?php echo $blog_id[$i]; ?>-<?php echo str_replace(" ","",$blog_title[$i]); ?>-blog.php" style="font-weight:bold;color:#235892;"> <?php echo $blog_title_org[$i]; ?></a> </h1>

<?php /*?><p class="faq-q"><span style="color:#6aaf08;"><?php echo $posting_dt[$i]; ?></span></p><?php */?>

<span class="faq-q"><b><?php date_default_timezone_set("Asia/Kolkata"); echo date("jS F Y",strtotime($posting_dt[$i])); ?></b></span><br>

<span class="body-text"><?php if($blog_image_path[$i] != "")  {  ?>

                                   <?php $image_path = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);?>

                                   <img src="https://www.asiancollegeofteachers.com/admin_act/blog_images/<?php echo basename($blog_image_path[$i]);  ?>" style="float:left; margin:15px 15px 15px 0px; border:1px solid #ccc; padding:2px;" width="180" height="110">

                                   <?php  }  ?>

								   <?php if($blog_pre_desc[$i] == "") {

									  $text = str_ireplace('<p>','<br>',substr(strip_tags($blog_desc[$i]),0,500));  $text = str_ireplace('</p>','',$text); 

									  //echo "Pre Desc";

									  }

									  else {

									  $text = str_ireplace('<p>','<br>',$blog_pre_desc[$i]);  $text = str_ireplace('</p>','',$text);

									  //echo "Post Desc";

									  } ?>

								<?php echo $text ?> ... </span>

                                   <br/>

                                   <div class="clearfix"></div>

                                

                             <div class="pull-right">

                             <?php if($written_by[$i]!=""){ ?><span><b>Written By :</b> <?php echo $written_by[$i]; ?></span><?php } ?>

                                   <span class="dropdown"  style="margin-left:10px;"><span class="fa fa-share-alt" class="dropdown-toggle" data-toggle="dropdown" style="font-size:16px;">  Share </span>

         <ul class="dropdown-menu clearfix" role="menu">

      <li><a href="http://www.facebook.com/sharer.php?u=https://www.teflindia.com/tefl-blog/<?php echo $blog_id[$i]; ?>-<?php echo str_replace(" ","",$blog_title[$i]); ?>-blog.php" target="_blank">Facebook</a></li>

      <li><a href="https://www.linkedin.com/sharing/share-offsite/?url=https://www.teflindia.com/tefl-blog/<?php echo $blog_id[$i]; ?>-<?php echo str_replace(" ","",$blog_title[$i]); ?>-blog.php" target="_blank">LinkdIn</a></li>

       <li><a href="whatsapp://send?text=https://www.teflindia.com/tefl-blog/<?php echo $blog_id[$i]; ?>-<?php echo str_replace(" ","",$blog_title[$i]); ?>-blog.php" + message, '_blank'>Whatsapp</a></li>

     

    </ul>

  </span>  

          </div>

                                 <br>

                                    <a class="btn btn-md btn-primary pull-left" href="<?php echo $blog_id[$i]; ?>-<?php echo str_replace(" ","",$blog_title[$i]); ?>-blog.php"><span style="font-weight:bold;">Read More</span></a></p><div class="clearfix"></div><br>

                                    </div>

<?php  }//end of loop for $i  ?>

 <!--PAGINATION START-->

        	<div class="paginate wrapper"><!-- The "wrapper" is just a comestic addition. You don't need this for the pagination to work. -->

                <ul>

                    <li><a href="./">First</a></li>

                    <li><a <?php if($page == 1) { ?>href="./" <?php } else { ?> href="./?page=<?php echo $page-1; ?>" <?php } ?>>Prev</a></li>

                    

                    <?php  for ($x=$s; $x<=$e; $x++) {  //echo $page; echo $i; ?>

                    <li><a <?php if($page == $x) { ?> class="active" <?php } else { ?> class="inactive" <?php } ?><?php if($x == 1) { ?> href="./" <?php } else { ?> href="./?page=<?php echo $x; ?>" <?php } ?> ><?php echo $x; ?></a></li>

                    <?php  }  ?>

                    

                    <!--<li><a href="" class="more">&hellip;</a></li>-->

                    <li><a <?php if($page == $total_pages) { ?>href="./?page=<?php echo $total_pages; ?>" <?php } else { ?> href="./?page=<?php echo $page+1; ?>" <?php } ?>>Next</a></li>

                    <li><a href="./?page=<?php echo $total_pages; ?>">Last</a></li>

                </ul>

            </div>

            

            <!--PAGINATION END-->

</div>

<div class="col-md-4">

<?php include('common/sidebar.php');?>

</div> 

</div><!--end row-->

</div><!--end container-->

</section>

 

       

<!--Body content Part End-->

  <?php include("common/footer.php"); ?>

