By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,048 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

How to included HTML formats and images in php forums?

100+
P: 228
Hi guys,
I want to build a forum for my php project and am done with almost all of it. but i wanted to include features such as bolding, italic and including images from the internet. I have seen on many forums that they use tags like this text to be bolded, [IMG]IMAGE URL [/IMG]....How can i process such tags? i am new to php.....
Feb 6 '08 #1
Share this Question
Share on Google+
3 Replies


nomad
Expert 100+
P: 664
Hi guys,
I want to build a forum for my php project and am done with almost all of it. but i wanted to include features such as bolding, italic and including images from the internet. I have seen on many forums that they use tags like this text to be bolded, [IMG]IMAGE URL [/IMG]....How can i process such tags? i am new to php.....
You can use the same naming tags in PHP is you do in HTML .
example:
<?php
$days = Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
echo "<TABLE BORDER=1 CELLPADDING=5><tr>\n";
foreach ($days as $day) {
echo "<TD BGCOLOR=\"#CCCCCC\" ALIGN=CENTER><strong>$day</strong></td>\n";

nomad
Feb 6 '08 #2

Markus
Expert 5K+
P: 6,050
Hi guys,
I want to build a forum for my php project and am done with almost all of it. but i wanted to include features such as bolding, italic and including images from the internet. I have seen on many forums that they use tags like this text to be bolded, [IMG]IMAGE URL [/IMG]....How can i process such tags? i am new to php.....
The code they use is known as BBCode.

http://www.bbcode.org/implementations.php

have a look :)
Feb 6 '08 #3

100+
P: 228
The code they use is known as BBCode.

http://www.bbcode.org/implementations.php

have a look :)
thanks for the link and the big tip buddy.
Feb 7 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.