Jump to content

How to put the code inside post?


Recommended Posts

do you mean like this

 

echo "Use the PHP tags";
?>

 

use the PHP BBcode tag

[code=php:0]Your  code here

 

[/code]

 

I wouldn't use the [.php] tags because if you ever CnP long code from it, there seems to be large amounts of linebreaks.  I always use the regular [.code] tags and just encapsulate my code with <?php ?> tags.

BTW, there is a way to write the string


so it is treated as a plain string without putting spaces or other useless characters in it. Just use the [nobbc][/nobbc] tags like I do:

 

Please use

tags when posting code

is actually typed as

Please use [nobbc]

[/nobbc] tags when posting

 

Ken

 

 

BTW, there is a way to write the string

so it is treated as a plain string without putting spaces or other useless characters in it

 

But then when you quote, it doesn't recognize the [nobbc][/nobbc] tags ;(

 

Plus, it's easier to add a period or space in.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.