Welcome, Guest.
Login
|
Register
Username:
Password:
Remember me:
BBcode Help
Please log in to post.
Watch thread
Unwatch thread
Started by
M.J kInG
01 Sep 2011 16:35
By
M.J kInG
(
1334
)
On 01 Sep 2011 16:37
Im have a problem with my BBcode script it won't work i wrote script in function
here script
<script type="text/javascript">
function bbCode($comment) {
$comment = preg_replace('/
(.*?)
/', '<b>$1</b>', $comment);
$comment = preg_replace('/[url=([^ ]+).*](.*?)[/url]/', '<a href="$1">$2</a>', $comment);
$comment = preg_replace('/[color=([[:alnum:]]{6}?).*](.*?)[/color]/', '<font color="$1">$2</font>', $comment);
return $comment;
}
print bbCode("This is
bold
text with the
green
color and a link to [url=http://www.php.net]PHP main page[/url]");
</script>
can u guys help me fix the problem
thanks for reading.
A true developer
By
PasserByGuy
(
268
)
On 01 Sep 2011 19:11
2 things:
1. If you're doing PHP, it's <script type="php">
2. <font> is deprecated in HTML5.
Use CSS instead.
Ex. <span style="color:myColor;">Text</span>
Does this alter-ego make me look stupid?
By
M.J kInG
(
1334
)
On 01 Sep 2011 22:36
ok i try that
A true developer
Nintendo 3DS is ™ Nintendo Co. Ltd. This website is ©2009-2024 HullBreach Studios. All rights reserved. Members are responsible for their own content. No account information will be given to third-parties without your consent.