what is missing in dis small code????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • arpan.rnc
    replied
    Originally posted by slowy View Post
    PHP Code:
    else if
    $show = $mob1;
    else 
    $show = $mob2;
    return 
    $show; 
    its giving me error

    Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/abcd/public_html/index.php on line 25


    your condition is missing from the else if
    try this :
    PHP Code:
    else if (<condition>)
    $show = $mob1; 
    else  
    $show = $mob2; 
    return 
    $show; 

    Leave a comment:


  • ReazulIqbal
    replied
    Try like this
    PHP Code:
    elseif($condition) {
    $show = $mob1;
    }
    else {
    $show = $mob2;
    }
    return 
    $show; 
    Last edited by ReazulIqbal; 04.06.11, 07:55.

    Leave a comment:


  • nimeshka
    replied
    Originally posted by slowy View Post
    PHP Code:
    else if
    $show = $mob1;
    else 
    $show = $mob2;
    return 
    $show; 
    its giving me error

    Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/abcd/public_html/index.php on line 25
    What is the condition you try by putting else if ?
    I dont know....but this will work
    PHP Code:
    else if(your condition){
    $show = $mob1;
    }else{
    $show = $mob2;
    }
    return 
    $show; 

    Leave a comment:


  • slowy
    started a topic what is missing in dis small code????

    what is missing in dis small code????

    PHP Code:
    else if
    $show = $mob1;
    else 
    $show = $mob2;
    return 
    $show; 
    its giving me error

    Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/abcd/public_html/index.php on line 25
Working...
X