Robis Posted March 21, 2006 Report Share Posted March 21, 2006 Funckiju strip_tags ar mainītu vienu argumentu - nevis izņemt visu, atstājot argumentā norādītos allowable tags, bet gan izņemt tieši konkrētus tagus (tā kā tiem var būt parametri, ar str_replace ir diezgan sarežģīti). Link to comment Share on other sites More sharing options...
Kristabs Posted March 21, 2006 Report Share Posted March 21, 2006 (edited) *** Edited March 21, 2006 by Kristabs Link to comment Share on other sites More sharing options...
Stopp Posted March 21, 2006 Report Share Posted March 21, 2006 (edited) preg_replace ? preg_replace("#<img (.*?)>#", "", $txt); Edited March 21, 2006 by Stopp Link to comment Share on other sites More sharing options...
Robis Posted March 21, 2006 Author Report Share Posted March 21, 2006 Man vajag lai izņem visus <p></p> tagus case-insensitive, bet lai neņem laukā saturu starp tiem! Link to comment Share on other sites More sharing options...
Stopp Posted March 21, 2006 Report Share Posted March 21, 2006 omg, točn ar karoti jābaro. $txt = preg_replace("#<p (.*?)>#", "", $txt); $txt = str_replace("</p>", "", $txt); var apvienot arī to visu zem viena preg_replace, ja nemaldos. Link to comment Share on other sites More sharing options...
KAC Posted March 21, 2006 Report Share Posted March 21, 2006 ja tu nebuutu tik slinks, tad nedaudz paskatoties http://lv.php.net/manual/en/function.strip-tags.php komentaaros vajadziigo arii atrastu Link to comment Share on other sites More sharing options...
bubu Posted March 21, 2006 Report Share Posted March 21, 2006 Īsti vīri dokumentāciju nelasa! Link to comment Share on other sites More sharing options...
Recommended Posts