Support » Fixing WordPress » 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:

    if( $success ){
    $success = !$success;
    $myvariable += 1;

    here is some html.

    // 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.