Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

why function doesn't work?

9 like 0 dislike
Hi,

I'm having problems with my php function and I'm sure it's something that I just can't see for too long looking at it. Can anyone lend a fresh set of eyes?

This code works:
PHP Code:
// Brisbane
   $img=picto_qty($products[$i]['bris']);
   if($products[$i]['bris'] == 8)
   {
    $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'style="background-color:red;color:white;text-align:center;padding-right:10px;padding-top:2px; " class="productListing-data" valign="top"',    
                                             'text' => $img);
   } else if($products[$i]['bris'] == 7) {            
    $info_box_contents[$cur_row][] = array('align' => 'center',                                             
                                             'params' => 'style="background-color:blue;color:white;text-align:center;padding-right:10px;padding-top:2px; " class="productListing-data" valign="top"',
                                             'text' => $img);
   } else {
    if($redBFlag == 1)
    {
     $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'style="background-color:red;text-align:center;padding-right:10px;padding-top:2px; " class="productListing-data" valign="top"',    
                                             'text' => $img);
    } else if($flagBGr == 1) {
     $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'style="background-color:#98FB98;text-align:center;padding-right:10px;padding-top:2px; " class="productListing-data" valign="top"',    
                                             'text' => $img);
    } else if($flagBris==1) {
     $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'style="background-color:#D3D3D3;text-align:center;padding-right:10px;padding-top:2px; " class="productListing-data" valign="top"',    
                                             'text' => $img);
    } else {
     $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'class="productListing-data" valign="top"',    
                                             'text' => $img);
    }
   }
asked 1 year ago by daneim (127,080 points)

1 Answer

1 like 0 dislike
 
Best answer
what is the problem in it can you tell me that first??
answered 1 year ago by marck_don (191,010 points)

Related questions

13 like 0 dislike
1 answer
9 like 0 dislike
3 answers
4 like 0 dislike
1 answer
asked 1 year ago by DBA-boss (120,990 points)
4 like 0 dislike
1 answer
12 like 0 dislike
2 answers