Sublime-What kind of specification should be followed by PHP code nested inside HTML

Source: Internet
Author: User

Do you have a problem with writing like me ()? Sublime in the format after using PHPFMT to become like this (, the introduction of header, tail file statement did not indent, the end of the} is no longer the same line with?>). Did I write enough specs? Or is there a problem with this format plugin?

! [Image of the crossing ...]

Reply content:

Do you have a problem with writing like me ()? Sublime in the format after using PHPFMT to become like this (, the introduction of header, tail file statement did not indent, the end of the} is no longer the same line with?>). Did I write enough specs? Or is there a problem with this format plugin?

! [Image of the crossing ...]

It is not your fault that this mixed format format would have been more or less problematic, and it is not recommended to use formatting in such a situation
Some additional templates are dedicated to the optimization of PHP coding style:

You can abbreviate it to

The syntax of if{}, for{}, foreach{}, while{}, switch{} can be replaced by
if:.. endif For:...endfor; Foreach:...endforeach; While:...endwhile; Swtich XX: ... endswitch;

And so on, the relative structure will be clearer

But you have to say it. After formatting the text editor, there is still a very neat template format, then find a template engine to do this job

aside, the functions of the MYSQL_ series have been deprecated, please switch to PDO or mysqli

Are you highlighting the syntax php? Look at the colors so messy

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.