Mam taki problem z wlasna funkcja, pewnie bedzie on banalny i temat za chwile bedzie zamkniety, ale jakos nie moge tego rozgryźć :|
no wiec mam funkcje:
<?php function bbcode ($conv) { $conv = preg_replace("#\[color=(.*?)?(.*?)\](.*?)\[/color\]#si", "<span style=\"color: \\2\">\\3</span>", $conv); $conv = preg_replace("#\[size=(.*?)?(.*?)\](.*?)\[/size\]#si", "<span style=\"font-size: \\2\">\\3</span>", $conv); return $conv; } ?>
wywoluje ja w index.php
<?php require 'includes/function/bbcode.php'; ?>
owszem tekst jest kolorowy, ale w źrodle brakuje ;
a dodajac do :
;
<?php $conv = preg_replace("#\[color=(.*?)?(.*?)\](.*?)\[/color\]#si", "<span style=\"color: \\2\">\\3</span>", $conv); ?>
<?php $conv = preg_replace("#\[color=(.*?)?(.*?)\](.*?)\[/color\]#si", "<span style=\"color: \\2\;">\\3</span>", $conv); ?>
mam bład
Kod
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Program Files\WebServ\httpd-users\pixarcell\includes\function\bbcode.php on line 7
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Program Files\WebServ\httpd-users\pixarcell\includes\function\bbcode.php on line 7
Parse error: syntax error, unexpected '<' in C:\Program Files\WebServ\httpd-users\pixarcell\includes\function\bbcode.php on line 7
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Program Files\WebServ\httpd-users\pixarcell\includes\function\bbcode.php on line 7
Parse error: syntax error, unexpected '<' in C:\Program Files\WebServ\httpd-users\pixarcell\includes\function\bbcode.php on line 7
co zepsułem?