hi, how is everybody doing? i hope well, i have a problem with some php code. i am trying to split some text in two parts once they have been split, they are display, but sometimes the php code break the source code of the page such as images and instead of the image i get the source code like this
i have tried for about 2 days now to fix it and i haven't been able to, so any help or guidence would be greatly appreciated. this is the code that i am currently using, i have tried to change the variable in the $findTag but nothing seems to work
<? php
$article =$this->article_>text;
$countchars=strlen($article);
$divide=$countchars/2;
$firstpart=substr($article,0,$divide);
$secondpart=substr($article,$divide);
//i keep changing the <p /> variable to <img /> and $image and many others but nothing seems to work
$findTag = strpos($secondpart, "<p /> ");
$var = $divide + $findTag
$firstpart = substr($article, 0, $var);
$secondpart = substr($article, $var);
?>
thanks