I have a mysql table (a picture is attached) that has a column responsible for pSkill , in this column there are always 6 values ​​in each row, I tried this code, but it did not work, output only the number I write in $mas[0] , that is, there where there is $mas[0] it gives out only 0%, and where $mas[3] , it gives out only 3% and so on to five.

 $row['pSkills'] = '0,1,2,3,4,5'; $mas = explode(',',$row['pSkills']); $table .= "<tr>"; $table .= "<td>Pistol</td>"; $table .= "<td>".$mas[0]." %</td>"; $table .= "</tr>"; 

Tell me, what am I doing wrong?

mysql table

  • var_dump($row['pSkills']); what shows? The result is in response. File encoding and html encoding? - doox911 7:57 pm
  • The file itself is php, and the encoding is utf-8. var_dump did not do anything, apparently because I replaced it with $ mas - breddy
  • Do you have an empty var_dump($row['pSkills']) output var_dump($row['pSkills']) ? - doox911 8:04 pm
  • Immediately apologize for my shoals. I still do not understand where I need to write it - breddy
  • Add code that selects data from the database and saves to the $row variable. - doox911 pm

0