Emacs php-mode: Removing duplicate <?php in header-line of php files

I use emacs php-mode.el and php-electric.el. I want to get rid of the duplicate <?php overlay that shows up at the top of any php file.

The extra <?php is not actually in the file, but is a semi transparent visual overlay that emacs is adding. I've done some research, and I think changing this might involve the emacs lisp header-line-format variable. But I can't find that anywhere in php-mode.

Also can't find any posts about people removing the extra <?php. Thanks for any help!


Figured it out. Adding (header-line-format 0) to my php-mode hook in my .emacs does the trick. So all together it looks like:

(autoload 'php-mode "php-mode" "Major mode for editing php scripts." t)
(setq auto-mode-alist  (cons '(".php$" . php-mode) auto-mode-alist))
(require 'php-mode)
(load-file "~/.emacs.d/emacs_includes/plugins/php-mode/php-electric.el")
(add-hook 'php-mode-hook
          '(lambda ()
             (define-abbrev php-mode-abbrev-table "ex" "extends")
             (define-key php-mode-map '[M-S-up] 'flymake-goto-prev-error)
             (define-key php-mode-map '[M-S-down] 'flymake-goto-next-error)
             (require 'php-electric)
             (php-electric-mode t)
             (tabbar-local-mode 1)
             (header-line-format 0)
             (semantic-show-unmatched-syntax-mode 0)

Need Your Help

Nested Array Foreach Issue

php arrays loops foreach

I am very basic new php learner, i having difficulty to get nested array value, here is my json result: