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 -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -