mysql - PHP - Search array for string -


i have page form post checkboxes 1 array in database. values in database looks this: "0,12,0,15,58,0,16". i'm listing these numbers , works fine, don't want 0 values listed on page, how able search through array , not list 0 values ?

i'm exploding array , using each loop display values @ moment.

the proper thing insert statement database query:

select * table value != 0 

however, if limited php use below code :)

   foreach($values $key => $value) {       //skip value if 0       if($value == 0) {         continue;       }        //do other values     } 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -