在<br/>之后的段落之间放置广告

时间:2018-07-31 07:34:34

标签: paragraphs

我有这个代码

     <?php
$content = '<p>his is a simple paragraph that is meant to be nice<br>
and easy to type which is why there will be mommas<br>
no periods or any capital letters so i guess this means<br>
that it cannot really be considered a paragraph but just<br>
&nbsp;</p>
';
$content = explode (' ', $content);
$halfway_mark = ceil(count($content) / 2);
$first_half_content = implode(' ', array_slice($content, 0, $halfway_mark));
$second_half_content = implode(' ', array_slice($content, $halfway_mark));
echo $first_half_content.'...';
echo ' YOUR ADS CODE';
echo $second_half_content;
?>

但是当我使用它时,我有这个罗素尔特

  

他的一段很简单,很容易输入

     

这就是为什么您的广告代码没有任何时段或任何时段的原因

     

大写字母,所以我想这意味着它不可能真的

     

考虑了一个段落但只是

那么我该如何解决这个问题,并在br之后像这样显示代码

  

他的一段很简单,很有趣

     

易于键入,这就是为什么会有Emommas

     

..您的广告COD

     

没有句号或任何大写字母,所以我想这是

     

它不能真正地视为一个段落,而仅仅是

0 个答案:

没有答案