Question : PHP mysql_fetch_assoc

I have

<td>
while($record=mysql_fetch_assoc($result))
      {
              echo "<font color=\"9fd3ff\">X</font>";
      }

how would I do
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
<td>
while($record=mysql_fetch_assoc($result))
{
if record exists
  { 
      TRUE
  }
else 
  {
     FALSE
  }
}
</td>

Answer : PHP mysql_fetch_assoc

Hi Jon,
Please look at post  http://www.experts-exchange.com/Q_26328009.html, where I showed you how to read the frequency table of a language.

If you want to 'preset' all letters, which are not set in your frequency file to probability 0, then just do this before you read in the probabilities of your file.



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
import string
# python has already a variable containing all ascii upper case letters
all_uppercase_letters = string.ascii_uppercase
# python has also the variable string.uppercase, but this might vary 
# depending on your computer's local settings (language settings)

# create the lookup table ( dict ), 
#that shall contain the frequencies for all the letters in your file.
freq_table =  {}  # empty dict is {} / empty list is []
for letter in all_uppercase_letters:
    freq_table[letter] = 0  # set all letter frequencies by default to 0
Random Solutions  
 
programming4us programming4us