How to......

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tsalexey544
Forum Commoner
Posts: 41
Joined: Thu Jun 22, 2006 11:19 am

How to......

Post by tsalexey544 »

You know when you put [php) (/php] befor and after a code (in this forum) it creates a very interasting square around the code. How to make those kind of square around any text. I want to put them on my site (not into a forum). Thanx =)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

try 'View source...' =)
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

<pre style="border: 1px solid black">
Some code
</pre>
tsalexey544
Forum Commoner
Posts: 41
Joined: Thu Jun 22, 2006 11:19 am

Post by tsalexey544 »

how to change the backround color and were can I find other tutorials on those squares =)?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Code: Select all

<?php

$data = highlight_file('./your_php_code.php', true);

?>

<div style="background: #ffffff; margin: 10px; padding: 4px; border: 1px solid #aaaaaa;">
    
    <?php echo $data; ?>

</div>
tsalexey544
Forum Commoner
Posts: 41
Joined: Thu Jun 22, 2006 11:19 am

Post by tsalexey544 »

Thanx!!!!!!!!!!
Post Reply