ヨルダン9108121544 9108121544 testEmail testEmail testAddress testAddress testCounty testCounty」ダブル結果(は、mysql_fetch_array)
この下にはしますprint_rの結果である
Array
(
[0] => 1
[id] => 1
[1] => 1
[department_id] => 1
[2] => jordan
[name] => jordan
[3] => 9108121544
[EGN] => 9108121544
[4] => testEmail
[email] => testEmail
[5] => testAddress
[address] => testAddress
[6] => testCounty
[country] => testCounty
)
私がデータベースに持っている情報は、id => 1、department_id => 1など... 私の質問は、私が二重のフィードバックを得る理由です(私はそれを呼び出す方法がわかりません)。 0 = ID、1 = department_id、2 =名前など..
私はforeach(...)をするとすべてが倍増します。 the manualから
mysql_fetch_array($ result、MYSQL_ASSOC)を使用してください。デフォルトでは、数値と列名の両方をインデックスとして返します。とにかく問題をスキップするには 'mysql_fetch_assoc()'をお勧めします。 –
[mysql_fetch_arrayと文字列配列キーのみ]の複製が可能です(http://stackoverflow.com/questions/7440479/mysql-fetch-array-and-only-string-array-keys) –