Title: PHP programming tip
Last modified: August 18, 2016

---

# PHP programming tip

 *  [eeve](https://wordpress.org/support/users/eeve/)
 * (@eeve)
 * [21 years ago](https://wordpress.org/support/topic/php-programming-tip/)
 * You don’t need to put the open and close php tags on every line of php. Only 
   around a block of php (between blocks of html). Like this:
    ` <?php if( $success){
   $success = !$success; }else{ $myvariable += 1; } ?>
 * here is some html.
 *  <?php
    // More php code // goes here. ?>
 * This will make your php code easier to read and more efficient.

The topic ‘PHP programming tip’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [programming](https://wordpress.org/support/topic-tag/programming/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [eeve](https://wordpress.org/support/users/eeve/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/php-programming-tip/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
