Nouras
Nouras

Reputation: 129

Not able to comment a short open tag in PHP using netbeans

Netbeans is giving a syntax error when commenting a short open tag like so

<?= // echo ... ?>

It works perfectly fine when I comment default tag

<?php // echo ... ?>

I have short_open_tag enabled in php.ini and I checked allow short tag in netbeans project

Upvotes: 0

Views: 163

Answers (2)

Salman
Salman

Reputation: 67

Ctrl-1 to open your Project window
Right-click on your project and click on Properties
Enable Allow short tags (<?)

enter image description here

Upvotes: 0

Ravindra Bhalothia
Ravindra Bhalothia

Reputation: 1770

You've to comment like that:

<?//= ... ?>

And no need to write echo if you're using short hand tags. As = means echo in that case.

Upvotes: 1

Related Questions