Php Foreach And For Loop Not Getting All Data From Sql Query Stack

Php Foreach And For Loop Not Getting All Data From Sql Query Stack