Page 1 of 1

Code used for wrapping code

Posted: Sat May 03, 2008 10:10 pm
by srirams
Hi

I have a KB page where I paste samples codes.
In this forum the tags "code" are used to wrap around code and upon submission the code is neatly wrapped.
I believe we need to use CSS for this. I would really appreciate if someone can paste the code for that.
Can I have the code used behind the "code" tag that will make my sample code in a page look like this.

Code: Select all

<?php
if ($cookiestatus <> 'loggedin') 
  { 
      $url = 'error.php'; 
      header("Location: $url"); 
  } 
$name = $_COOKIE['name'];
?>

Thanks

Re: Code used for wrapping code

Posted: Wed May 07, 2008 12:04 am
by srirams
Hi guys,

I am still waiting for a reply to this request.

Thanks

Re: Code used for wrapping code

Posted: Wed May 07, 2008 12:08 am
by John Cartwright
Asking us to do the work for you is not going to fly.

Considering this has been implemented many times, I would suggest you search for one of the many existing solutions.

Hint: It's called bbcode