echo preg_replace('/<!--(.|\s)*?-->/', '', $metin);

sagolun, bu sekilde guzel oldu

18 Mayıs 2010 13:17 tarihinde Adem Alp YILDIZ <[email protected]> yazdı:

> echo preg_replace('/<!--(.|\s)*?-->/', '', $metin);
>
> çok satırlı açıklamalarda da çalışır.
>
> 2010/5/18 Onur Yerlikaya <[email protected]>:
> > <?php
> > $var = '<!-- xxasldjaskjdlkasj lasd --> Metin dosyası <!-- baska bir
> yorum
> > satırı --> <h1>foobar</h1> <!-- muthis bir yorum satiri daha -->
> > <p>parag</p>';
> > echo preg_replace("/<!--(.*?)-->/","",$var);
> _______________________________________________
> Linux-programlama mailing list
> [email protected]
> https://liste.linux.org.tr/mailman/listinfo/linux-programlama
> Liste kurallari: http://liste.linux.org.tr/kurallar.php
>
_______________________________________________
Linux-programlama mailing list
[email protected]
https://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php

Cevap