php - How to do process with for() function and give return true in the last -


i have project, , have 1 problem. can me? have code:

for($i=0; $i < $rows; $i++){    if(do_something == true){       return true;    }else{       return false;    } }      

if, have 10 data, , want do_something process data. problem is, script stop in first data. so, delete return true; , leave blank. script process data. question is, how can put return true; in end of process, know no error in process.

use this:

for($i=0; $i < $rows; $i++){    if(do_something == false){        return false;    } } return true; 

it "do something" long successful, , until done, , abort @ first "false" result of "do something".


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -