1

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

Example:

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Title</title>
</head>
<body>

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

<?php phpinfo();?>
</body>

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.