php - Loop numbers through Dropdown but getting number instead of letters -


What I am trying to do, puts a letter in the value of each dropdown based on the dropdown. Instead of getting the number and how does the loop end when it reaches the letter Z?

Instead of I, instead of A, I am getting 2 instead of 1 and 2. How to get all the characters in addition to the final value and I used the substrings

table structure

  id | Main code Category 1 | BAS-01 | Supplies 2 | Bass-02 | IT equipment 3 | Bas-03 office equipment & lt; Select Name = "Main Code" id = "Main Code" onchange = "GetChangedValue (this.value);" & Gt; & Lt; Option value = "" & gt; & Lt; / Options & gt; & Lt ;? Php $ mysqli = new mysqli ("localhost", "root", "", "data"); $ Result2 = $ mysqli- & gt; Query ("SELECT * FROM to Category ORDER ID"); While ($ line = $ result 2- & gt; fetch_assoc ()) {if (empty ($ result2)) {$ data = 'A'; } And {$ data ++; } // resonance $ data; // A ++ resonant "& lt; option value = '" $ line ['Maincode'] $ data .. "'& Gt;" $ Line ['category'] "& lt; / options & gt; }? & Gt; & Lt; / Select & gt; & Lt; Script & gt; $ ('[Name = "maincode"]') changed (function () {$ ('[name = "item"]') Val ($ (this) .val () substrings (0,5)) ..} ); & Lt; / Script & gt; & Lt; Input type = "" name = "item" id = "item" value = "" & gt; Outside ; Add text to "itemprop =" text "> 

another $ data = 'A' after

  $ data = 'A'; While ($ line = $ result 2- & gt; fetch_assoc ()) {if (empty ($ result2)) {$ data = 'A'; } And {$ data ++; } // resonance $ data; // A ++ resonant "& lt; option value = '" $ line ['Maincode'] $ data .. "'& Gt;" $ Line ['category'] "& lt; / options & gt; }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -