Jump to content

add breakline in for loop which is in foreach


Recommended Posts

how can i add a breack line using for loop in an foreach

i have written this code but i know it is wrong


        $total_regional_units +=$reginoal_own_units;
        for ($i = 0; $i <= count($countries); $i+=3) {
           if ($i % 3 == 0){
                $break_line = "<br>";
        echo $countryname . " ( " .$reginoal_own_units . " ) ".round($regional_calc,0)."" . $break_line;

Edited by salgergawi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...