PHP programming tip (1 post)

  1. Eeve
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic