Archive for november 5th, 2009

Kommentek eltavolitasa HTML kodbol

november 05th, 2009 | Category: PHP

Ez egy egyszeru funkcio, amely parameterben egy szoveget var. Kimenetkepp visszaadja a szoveget ugy, hogy kitorli belole a HTML kommenteket.
„<!– ….. –>”

<?php
function remove_comments($s) {
  return preg_replace('/<!--(.+?)-->/s', '', $s);
}
Comments are off for this post