anybody have any idea how people get those php boxes, "code" boxes??
for example if somebody was writing a tutorial, how do they get a box with a bunch of php code to be shown like normal html on a php page but with the php colours like dreamweaver shows?
Comments
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
and what do i search for on php.net?
It colours the code appropiately and makes it look as it shoud... and because of what it is Im not sure what to type in to search for it...
The Royal Ram
[PHP]<?php
$str = "<? echo 'This is a string'; ?>";
echo highlight_string($str);
?>[/PHP]
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
The Royal Ram
The Royal Ram
[PHP]<?php
$str = "<? echo 'This is a string.
$foo = "foobar";'
; ?>";
echo highlight_string($str);
?> [/PHP]
When PHP sees one of these quote characters in your code it thinks you are trying to end the variable.... in your case the variable $str
So in the code you actually want to display replace all " with '
That should then work me thinks
The Royal Ram
Good point xPure, this has now been moved to the PHP section.