Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> wyrażenie regularne
Szejk
post
Post #1





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 11.08.2004

Ostrzeżenie: (0%)
-----


Witam.
Mam taki kod:
  1. <?
  2.  $dat = preg_replace(&#092;"#[php](.*?)[/php]#sie\", \" highlight_string(\"1\", TRUE); \", $dat); 
  3. ?>

działa ok, ale chce żeby cały "pokolorowany" kod by na białym tle, czyli np. w div'ie z białym tłem-tak jak jest na tym forum , próbowałem ale mi coś nie wychodzi (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
pozdro

Ten post edytował Szejk 29.01.2005, 15:12:14
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Szejk
post
Post #2





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 11.08.2004

Ostrzeżenie: (0%)
-----


hehe chyba sam w to nie wierzysz :P, próbowałem już tak i też te same błędy:
Cytat
Parse error: syntax error, unexpected '<' in C:\WebServ\httpd-users\test\aa.php(7) : regexp code on line 1

Fatal error: preg_replace() [function.preg-replace]: Failed evaluating code: <div class=stylphp> highlight_string("<? echo \"asdasd\"; ?> ", TRUE); </div> in C:\WebServ\httpd-users\test\aa.php on line 7

macie jakieś inne pomysły?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 7.10.2025 - 14:53