w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Php drop down menu. If value exists in mysql, it is the selected value in drop down menu

Very difficult to read.. there might be an extra bracket or a bracket missing but ...

foreach ( $transaction_type as $i => $opt1 ) : 
    $option = '<option value="' .htmlspecialchars($opt1) .'"';

   if(($result[VatReturnTransactionType01] != '' AND 
       htmlspecialchars($opt1) ==
       OR htmlspecialchars($opt1) ==
       $option .= 'selected';

   $option .= '>'.htmlspecialchars($opt1) .'</option>';

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.