Merci pour vos réponses mais en fait, je cherchai le nom du plugin qui affiche le code. En regardant le code source, j'ai trouvé son nom SyntaxHighlighter. Je l'ai donc téléchargé, j'ai essaié de le faire fonctionner mais il ne fonctionne pas. J'ai ajouté ces deux lignes dans mon fichier.
<?php echo $this->Html->script(array('syntaxhighlighter/shCore', 'syntaxhighlighter/shBrushPhp'), array('inline' => false)); ?>
<?php echo $this->Html->css(array('syntaxhighlighter/shCore', 'syntaxhighlighter/shThemeDefault.css'), null, array('inline' => false)); ?>
Et quand je vais voir dans la console, il y a ça d'écrit:
Uncaught ReferenceError: XRegExp is not defined shCore.js:109
Uncaught TypeError: Cannot read property 'Highlighter' of null shBrushPhp.js:65
Enfin pour afficher le code dans ma page, j'ai écrit cela.
<pre class="brush: php"><p>J'aimerai faire cela</p></pre>