Bootstrap Templates Bundle

Sunday, September 15, 2013

How to show HTML and PHP code on a site?

Sometimes in tutorial blog or in some other cases it's needed to show html/php  code onto website.

Suppose you want to show  <?php echo wp_ruby_1(); ?> then you can use the below codes

system1:   <pre>&lt?php echo wp_ruby_1(); ?&gt </pre>
or
system2:   <?php highlight_string('<?php echo wp_ruby_2(); ?>'); ?>


System 1 can be used for both HTML/PHP but system 2 can be used for only php code

No comments:

Post a Comment

Wokiee React eCommerce Template