Aikss Posted May 26, 2008 Report Share Posted May 26, 2008 (edited) Viss iet daudzmaz, tikai nekādīgi neizdodas uzlikt, lai skatītu vairākas rindiņas. <!-- Some text. Some text. Some text. Some text. --> $pattern = '/(<\!\-\-.*-->{1,1})/m'; $replacement = '<span style="color: #A52A2A">$1</span>'; $date = preg_replace($pattern, $replacement, $date); Meiģinu vairākas variācijas, liekot \s, \t, \r un m(beigās), bet nekas nesanāk. Edited May 26, 2008 by Aikss Link to comment Share on other sites More sharing options...
andrisp Posted May 26, 2008 Report Share Posted May 26, 2008 (edited) Kas īsti ir iekš $date ? Sapratu, ka iekš tā date. Kam tev tas {1,1} ? Edited May 26, 2008 by andrisp Link to comment Share on other sites More sharing options...
martins256 Posted May 26, 2008 Report Share Posted May 26, 2008 (edited) man liekas, ka s bija vairākām rindām! ar s, "(<!--.*-->{1,1})" un to komentu sanāk. Edited May 26, 2008 by martins256 Link to comment Share on other sites More sharing options...
Aikss Posted May 26, 2008 Author Report Share Posted May 26, 2008 (edited) Kas īsti ir iekš $date ? $date = $row['date']; $date = htmlspecialchars($date, ENT_QUOTES, 'UTF-8'); $date = stripcslashes($date); $date = explode("\n", $date); $rindinu_skaits = count($rez); $date= xhtml_color($date); ... Date ir array! Bāc neaizdomājos līdz tam, iepriekš izvadīju ul li un no tā arī ir $date = explode("\n", $date);. Listi aizvācu, bet explode palika. Paldies andrisp! Šādi aizgāja $pattern = '/(<\!\-\-.*-->)/s'; Paldies martins256 Edited May 26, 2008 by Aikss Link to comment Share on other sites More sharing options...
Recommended Posts