how can I highlight php code in a HTML document and the document itself?


<!DOCTYPE html>
<html lang="de">
<meta charset="utf-8">

<h1><?php echo "Hello world!"; ?></h1>

<?php phpinfo();?>

I usually I use the listings package, but I don't know how to change the language when the php-Tag starts.

Thanks in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.