Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
after 1 or 2 or 3 para to set google ads
-------------php-----------------
<div class="content-details">
<?php echo $details;?>
</div>
<div id="images">
<?php if(!empty($quatation)){ ?>
<?php
$quatation=unserialize($details);
?>
<?php foreach($quatation as $by => $quat){
if(is_array($quat)) {
foreach($quat as $qut) { ?>
<div class="adv-img text-center hidden-print">
<div class="quote">
<p><i class="fa fa-quote-left"></i> <?php echo $qut; ?> <i
class="fa fa-quote-right"></i></p>
</div>
</div>
<?php } }else{ ?>
<div class="adv-img text-center hidden-print">
<div class="quote">
<p><i class="fa fa-quote-left"></i> <?php echo $quat; ?> <i
class="fa fa-quote-right"></i></p>
</div>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
<div class="adv-img text-center marginTopBottom20 hidden-print">
<!-- /21655469720/JagoNews_Desktop_Details_News_Inner_B -->
<div id='div-gpt-ad-1509258458742-11'>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- In_article_responsive -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-5219299595808889"
data-ad-slot="4380673496"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<div class="adv-img text-center marginTopBottom20 hidden-print">
<!-- /21655469720/JagoNews_Desktop_Details_News_Inner_B -->
<div id='div-gpt-ad-1509258458742-11'>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- In_article_responsive_2 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-5219299595808889"
data-ad-slot="2982997191"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<div class="adv-img text-center marginTopBottom20 hidden-print">
<!-- /21655469720/JagoNews_Desktop_Details_News_Inner_B -->
<div id='div-gpt-ad-1509258458742-11'>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- In_article_reponsive_3 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-5219299595808889"
data-ad-slot="1419484143"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</div>
------------------Js----------------
<script type="text/javascript">
$(function () {
var $images = $("#images").find(".adv-img");
$('.content-details > p:nth-child(2n+1)').each(function (i) {
$(this).after($images.get(i));
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment