-4
<p class="para" style="line-height:1.2em;font-size:0.8em;height:70px;">
            <?php echo $urun[$i]["icerik"]; ?>
</p>

I tried to print $urun[$i]["icerik"]; in <p></p> tags but it is printed under this paragraph tags.

Output:

<p class="para" style="line-height:1.2em;font-size:0.8em;height:70px;">
            </p>
<p>·LED Nokta Aydınlatma ile keskin , yüksek çözünür..</p>

I am using CKEditor to set the "icerik". So it is saved in mysql with html tags. But i don' t know, why its writed under the <p>tags?

Dauezevy
  • 1,012
  • 4
  • 22
  • 46

1 Answers1

2

You aren't looking at the output from PHP. The browser has parsed the HTML source into a DOM. You are looking at it in a DOM inspector which converts it back to HTML (after repair and normalisation).

You cannot have a paragraph inside another paragraph.

The <p> inside your variable implicitly terminates the <p class="para" style="line-height:1.2em;font-size:0.8em;height:70px;">.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335