trancedm
06-05-2005, 06:39 PM
i wanted to do something like this...
ex.
$dbhost = "localhost";
$dbname = "DATABASE_NAME";
$dbuser = "USERNAME";
$dbpass = "PASSWORD";
^^ i want the PHP code to be highlighted even without the PHP tag ("<?php" "?>") is there a way to do that?
i think i could use the highlight_string() function, but how would i display huge chunk of code like the example above
something like this would work
<?php
$code = "echo \"Hello world!\";";
highlight_string($code);
?>
but thats only one a liner code..
anyone can help me out? thanx in advance
ex.
$dbhost = "localhost";
$dbname = "DATABASE_NAME";
$dbuser = "USERNAME";
$dbpass = "PASSWORD";
^^ i want the PHP code to be highlighted even without the PHP tag ("<?php" "?>") is there a way to do that?
i think i could use the highlight_string() function, but how would i display huge chunk of code like the example above
something like this would work
<?php
$code = "echo \"Hello world!\";";
highlight_string($code);
?>
but thats only one a liner code..
anyone can help me out? thanx in advance