Continue checking and returning for more matches in foreach if statement










0















I have a function that is essentially going through a CSV file, and finding rows that match up with a user's settings in their profile. Anyway...



The issue is that I'm checking through the CSV file for each car (row), and then returning the value if the car matches the user's setting. The issue is, if a user has a setting for the following:



  • Honda Civic 1993 through 2007

  • Jeep Liberty 2002 through 2018

And the CSV has records of:



  • Honda Civic 1996

  • Honda Civic 2004

  • Jeep Liberty 2010

... currently the if statement will only return the first iteration of the Honda Civic, before it then returns the Jeep Liberty. So it never knows to move to the next / subsequent matches of the if statement.



 private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)
$tmp = explode("


How can I adjust the foreach and/or if statement, so that it will not stop at the first version of a Make/Model/Year... but that it will continue to return each match as a new $car?



Otherwise, currently the output is:



  • Honda Civic 1996

  • Jeep Liberty 2010

But I need it to also return the other matching Honda Civic 2004










share|improve this question


























    0















    I have a function that is essentially going through a CSV file, and finding rows that match up with a user's settings in their profile. Anyway...



    The issue is that I'm checking through the CSV file for each car (row), and then returning the value if the car matches the user's setting. The issue is, if a user has a setting for the following:



    • Honda Civic 1993 through 2007

    • Jeep Liberty 2002 through 2018

    And the CSV has records of:



    • Honda Civic 1996

    • Honda Civic 2004

    • Jeep Liberty 2010

    ... currently the if statement will only return the first iteration of the Honda Civic, before it then returns the Jeep Liberty. So it never knows to move to the next / subsequent matches of the if statement.



     private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)
    $tmp = explode("


    How can I adjust the foreach and/or if statement, so that it will not stop at the first version of a Make/Model/Year... but that it will continue to return each match as a new $car?



    Otherwise, currently the output is:



    • Honda Civic 1996

    • Jeep Liberty 2010

    But I need it to also return the other matching Honda Civic 2004










    share|improve this question
























      0












      0








      0








      I have a function that is essentially going through a CSV file, and finding rows that match up with a user's settings in their profile. Anyway...



      The issue is that I'm checking through the CSV file for each car (row), and then returning the value if the car matches the user's setting. The issue is, if a user has a setting for the following:



      • Honda Civic 1993 through 2007

      • Jeep Liberty 2002 through 2018

      And the CSV has records of:



      • Honda Civic 1996

      • Honda Civic 2004

      • Jeep Liberty 2010

      ... currently the if statement will only return the first iteration of the Honda Civic, before it then returns the Jeep Liberty. So it never knows to move to the next / subsequent matches of the if statement.



       private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)
      $tmp = explode("


      How can I adjust the foreach and/or if statement, so that it will not stop at the first version of a Make/Model/Year... but that it will continue to return each match as a new $car?



      Otherwise, currently the output is:



      • Honda Civic 1996

      • Jeep Liberty 2010

      But I need it to also return the other matching Honda Civic 2004










      share|improve this question














      I have a function that is essentially going through a CSV file, and finding rows that match up with a user's settings in their profile. Anyway...



      The issue is that I'm checking through the CSV file for each car (row), and then returning the value if the car matches the user's setting. The issue is, if a user has a setting for the following:



      • Honda Civic 1993 through 2007

      • Jeep Liberty 2002 through 2018

      And the CSV has records of:



      • Honda Civic 1996

      • Honda Civic 2004

      • Jeep Liberty 2010

      ... currently the if statement will only return the first iteration of the Honda Civic, before it then returns the Jeep Liberty. So it never knows to move to the next / subsequent matches of the if statement.



       private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)
      $tmp = explode("


      How can I adjust the foreach and/or if statement, so that it will not stop at the first version of a Make/Model/Year... but that it will continue to return each match as a new $car?



      Otherwise, currently the output is:



      • Honda Civic 1996

      • Jeep Liberty 2010

      But I need it to also return the other matching Honda Civic 2004







      php function loops if-statement foreach






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 13 '18 at 17:51









      GarconisGarconis

      567417




      567417






















          2 Answers
          2






          active

          oldest

          votes


















          1














          You can turn your function into a generator (see PHP Generators Overview https://secure.php.net/manual/en/language.generators.overview.php):



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end) 
          $tmp = explode("


          and call it like:



          foreach (find_vehicle($cars, $make, $model, $yr_start, $yr_end) as $car) 
          // Do something with $car






          share|improve this answer























          • Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

            – Garconis
            Nov 15 '18 at 17:33











          • Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

            – Ron Dobley
            Nov 15 '18 at 18:07












          • Seems to work well. Thanks for the extra tip!

            – Garconis
            Nov 15 '18 at 21:34


















          0














          The idea would be to build an array for the matching cars, and return this list at the end of the function (some comments in the code)...



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)", $model);
          $model = $tmp[1];
          // List of matching records
          $matching = ;
          // echo 'Looking for: ' . $make . ' '. $model . ' between: '.$yr_start .'-'.$yr_end . '<br>';
          foreach ( $cars as $car )
          if ($make == $car[1] && $model == $car[2])
          if ($car[4] >= $yr_start && $car[4] <= $yr_end)
          // Add new entry to matching list (rather than return the first one)
          $matching = $car;



          return $matching;



          This uses $matching to keep a list, adding to it using



          $matching = $car;


          At the end it passes this back, it will be an empty list if nothing is found



          return $matching;


          As you can also see I've commented out the echo - it's useful for debugging, but try and avoid methods that both process data and produce output unless you have to.






          share|improve this answer























          • Looks like this now causes the output to be two Array and a blank: - Array - Array -

            – Garconis
            Nov 13 '18 at 18:11











          • The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

            – Nigel Ren
            Nov 13 '18 at 18:13












          • Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

            – Garconis
            Nov 13 '18 at 18:37











          • Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

            – Nigel Ren
            Nov 13 '18 at 18:40











          • Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

            – Garconis
            Nov 13 '18 at 18:48










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286853%2fcontinue-checking-and-returning-for-more-matches-in-foreach-if-statement%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          You can turn your function into a generator (see PHP Generators Overview https://secure.php.net/manual/en/language.generators.overview.php):



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end) 
          $tmp = explode("


          and call it like:



          foreach (find_vehicle($cars, $make, $model, $yr_start, $yr_end) as $car) 
          // Do something with $car






          share|improve this answer























          • Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

            – Garconis
            Nov 15 '18 at 17:33











          • Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

            – Ron Dobley
            Nov 15 '18 at 18:07












          • Seems to work well. Thanks for the extra tip!

            – Garconis
            Nov 15 '18 at 21:34















          1














          You can turn your function into a generator (see PHP Generators Overview https://secure.php.net/manual/en/language.generators.overview.php):



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end) 
          $tmp = explode("


          and call it like:



          foreach (find_vehicle($cars, $make, $model, $yr_start, $yr_end) as $car) 
          // Do something with $car






          share|improve this answer























          • Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

            – Garconis
            Nov 15 '18 at 17:33











          • Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

            – Ron Dobley
            Nov 15 '18 at 18:07












          • Seems to work well. Thanks for the extra tip!

            – Garconis
            Nov 15 '18 at 21:34













          1












          1








          1







          You can turn your function into a generator (see PHP Generators Overview https://secure.php.net/manual/en/language.generators.overview.php):



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end) 
          $tmp = explode("


          and call it like:



          foreach (find_vehicle($cars, $make, $model, $yr_start, $yr_end) as $car) 
          // Do something with $car






          share|improve this answer













          You can turn your function into a generator (see PHP Generators Overview https://secure.php.net/manual/en/language.generators.overview.php):



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end) 
          $tmp = explode("


          and call it like:



          foreach (find_vehicle($cars, $make, $model, $yr_start, $yr_end) as $car) 
          // Do something with $car







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 '18 at 20:44









          Ron DobleyRon Dobley

          887




          887












          • Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

            – Garconis
            Nov 15 '18 at 17:33











          • Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

            – Ron Dobley
            Nov 15 '18 at 18:07












          • Seems to work well. Thanks for the extra tip!

            – Garconis
            Nov 15 '18 at 21:34

















          • Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

            – Garconis
            Nov 15 '18 at 17:33











          • Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

            – Ron Dobley
            Nov 15 '18 at 18:07












          • Seems to work well. Thanks for the extra tip!

            – Garconis
            Nov 15 '18 at 21:34
















          Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

          – Garconis
          Nov 15 '18 at 17:33





          Any idea on how to get this to work, within the following Gist? gist.github.com/Garconis/6154c0c9a3a1209773d19e132e789bab

          – Garconis
          Nov 15 '18 at 17:33













          Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

          – Ron Dobley
          Nov 15 '18 at 18:07






          Looking at line 166 of that Gist, you would use the above Generator like: foreach ($this->find_vehicle($cars, $make, $model, $year_start, $year_end) as $car) array_push($vehicles, $car);

          – Ron Dobley
          Nov 15 '18 at 18:07














          Seems to work well. Thanks for the extra tip!

          – Garconis
          Nov 15 '18 at 21:34





          Seems to work well. Thanks for the extra tip!

          – Garconis
          Nov 15 '18 at 21:34













          0














          The idea would be to build an array for the matching cars, and return this list at the end of the function (some comments in the code)...



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)", $model);
          $model = $tmp[1];
          // List of matching records
          $matching = ;
          // echo 'Looking for: ' . $make . ' '. $model . ' between: '.$yr_start .'-'.$yr_end . '<br>';
          foreach ( $cars as $car )
          if ($make == $car[1] && $model == $car[2])
          if ($car[4] >= $yr_start && $car[4] <= $yr_end)
          // Add new entry to matching list (rather than return the first one)
          $matching = $car;



          return $matching;



          This uses $matching to keep a list, adding to it using



          $matching = $car;


          At the end it passes this back, it will be an empty list if nothing is found



          return $matching;


          As you can also see I've commented out the echo - it's useful for debugging, but try and avoid methods that both process data and produce output unless you have to.






          share|improve this answer























          • Looks like this now causes the output to be two Array and a blank: - Array - Array -

            – Garconis
            Nov 13 '18 at 18:11











          • The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

            – Nigel Ren
            Nov 13 '18 at 18:13












          • Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

            – Garconis
            Nov 13 '18 at 18:37











          • Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

            – Nigel Ren
            Nov 13 '18 at 18:40











          • Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

            – Garconis
            Nov 13 '18 at 18:48















          0














          The idea would be to build an array for the matching cars, and return this list at the end of the function (some comments in the code)...



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)", $model);
          $model = $tmp[1];
          // List of matching records
          $matching = ;
          // echo 'Looking for: ' . $make . ' '. $model . ' between: '.$yr_start .'-'.$yr_end . '<br>';
          foreach ( $cars as $car )
          if ($make == $car[1] && $model == $car[2])
          if ($car[4] >= $yr_start && $car[4] <= $yr_end)
          // Add new entry to matching list (rather than return the first one)
          $matching = $car;



          return $matching;



          This uses $matching to keep a list, adding to it using



          $matching = $car;


          At the end it passes this back, it will be an empty list if nothing is found



          return $matching;


          As you can also see I've commented out the echo - it's useful for debugging, but try and avoid methods that both process data and produce output unless you have to.






          share|improve this answer























          • Looks like this now causes the output to be two Array and a blank: - Array - Array -

            – Garconis
            Nov 13 '18 at 18:11











          • The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

            – Nigel Ren
            Nov 13 '18 at 18:13












          • Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

            – Garconis
            Nov 13 '18 at 18:37











          • Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

            – Nigel Ren
            Nov 13 '18 at 18:40











          • Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

            – Garconis
            Nov 13 '18 at 18:48













          0












          0








          0







          The idea would be to build an array for the matching cars, and return this list at the end of the function (some comments in the code)...



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)", $model);
          $model = $tmp[1];
          // List of matching records
          $matching = ;
          // echo 'Looking for: ' . $make . ' '. $model . ' between: '.$yr_start .'-'.$yr_end . '<br>';
          foreach ( $cars as $car )
          if ($make == $car[1] && $model == $car[2])
          if ($car[4] >= $yr_start && $car[4] <= $yr_end)
          // Add new entry to matching list (rather than return the first one)
          $matching = $car;



          return $matching;



          This uses $matching to keep a list, adding to it using



          $matching = $car;


          At the end it passes this back, it will be an empty list if nothing is found



          return $matching;


          As you can also see I've commented out the echo - it's useful for debugging, but try and avoid methods that both process data and produce output unless you have to.






          share|improve this answer













          The idea would be to build an array for the matching cars, and return this list at the end of the function (some comments in the code)...



          private function find_vehicle($cars,$make,$model,$yr_start,$yr_end)", $model);
          $model = $tmp[1];
          // List of matching records
          $matching = ;
          // echo 'Looking for: ' . $make . ' '. $model . ' between: '.$yr_start .'-'.$yr_end . '<br>';
          foreach ( $cars as $car )
          if ($make == $car[1] && $model == $car[2])
          if ($car[4] >= $yr_start && $car[4] <= $yr_end)
          // Add new entry to matching list (rather than return the first one)
          $matching = $car;



          return $matching;



          This uses $matching to keep a list, adding to it using



          $matching = $car;


          At the end it passes this back, it will be an empty list if nothing is found



          return $matching;


          As you can also see I've commented out the echo - it's useful for debugging, but try and avoid methods that both process data and produce output unless you have to.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 '18 at 17:56









          Nigel RenNigel Ren

          27.5k61933




          27.5k61933












          • Looks like this now causes the output to be two Array and a blank: - Array - Array -

            – Garconis
            Nov 13 '18 at 18:11











          • The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

            – Nigel Ren
            Nov 13 '18 at 18:13












          • Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

            – Garconis
            Nov 13 '18 at 18:37











          • Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

            – Nigel Ren
            Nov 13 '18 at 18:40











          • Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

            – Garconis
            Nov 13 '18 at 18:48

















          • Looks like this now causes the output to be two Array and a blank: - Array - Array -

            – Garconis
            Nov 13 '18 at 18:11











          • The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

            – Nigel Ren
            Nov 13 '18 at 18:13












          • Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

            – Garconis
            Nov 13 '18 at 18:37











          • Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

            – Nigel Ren
            Nov 13 '18 at 18:40











          • Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

            – Garconis
            Nov 13 '18 at 18:48
















          Looks like this now causes the output to be two Array and a blank: - Array - Array -

          – Garconis
          Nov 13 '18 at 18:11





          Looks like this now causes the output to be two Array and a blank: - Array - Array -

          – Garconis
          Nov 13 '18 at 18:11













          The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

          – Nigel Ren
          Nov 13 '18 at 18:13






          The difference is that now your output is an array of matches whereas before you were getting 1 returned value. So you either need to do a foreach over the results of whatever method your using need to be in some form of loop.

          – Nigel Ren
          Nov 13 '18 at 18:13














          Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

          – Garconis
          Nov 13 '18 at 18:37





          Is it possible for you to update your answer, so that the output of $car is still each individual record/value? The $car variable is used throughout the rest of the document, and I think it expects it to be a single car, not an array. For example: d.pr/free/i/YfshKb and d.pr/free/i/8UnUMK

          – Garconis
          Nov 13 '18 at 18:37













          Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

          – Nigel Ren
          Nov 13 '18 at 18:40





          Not sure how I can return a list of cars as 1 car, this is contradicting what your asking for.

          – Nigel Ren
          Nov 13 '18 at 18:40













          Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

          – Garconis
          Nov 13 '18 at 18:48





          Ah, well, in the original code example, it was creating a $car for each match (unless it was the same make/model). But the $car wasn't an array. Now with your code, the $car result is an array, and I'm not sure how to get the value of each one... so that other uses of the $car variable can make use of it.

          – Garconis
          Nov 13 '18 at 18:48

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286853%2fcontinue-checking-and-returning-for-more-matches-in-foreach-if-statement%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo