1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[help] WP code problem

Discussion in 'PHP & Perl' started by Seedk, May 23, 2012.

  1. Seedk

    Seedk Newbie

    Joined:
    May 21, 2012
    Messages:
    6
    Likes Received:
    1
    Can someone tell me if this code has an error inside :
    Code:
    if ($user->created > 1337524548){if(zile_reg() >= 0) {
    echo '<h1>Introducere</h1>';
    
    
    }
    }
    This is working but the code above not :
    Code:
    if ($user->created < 1337524548) { foreach ($view->result as $index => $result) {
    $term = taxonomy_get_term($result->term_data_tid);
    if (!isset($taxonomy[$result->term_data_tid])) {
    $taxonomy[$result->term_data_tid] = $term;
    $counts[$result->term_data_tid] = 0;
    }
    $counts[$result->term_data_tid]++;
    
    
    }
    }
    I am talking about this line :
    Code:
    if ($user->created > 1337524548)
     
  2. tripper_john_md

    tripper_john_md Newbie

    Joined:
    Feb 21, 2011
    Messages:
    40
    Likes Received:
    35
    Location:
    Southern Germany
    At least no syntax error. Try to print_r, echo or var_export your variables - is $user->created greater than 1337524548? Does zile_reg() return a value greater than -1?

    And try to use better titles for your postings... ;)
     
    • Thanks Thanks x 1
  3. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    True, I took the liberty of fix it for him, thanks :)