title: exit for loop with echo
body: <p>The following PHP code is working as expected. I need to echo "copy error" message when the code is unable to execute the command in 4 attempts.</p>
  
  <pre><code>for($num_tries = 0 ; $num_tries &lt; 4 ; $num_tries++)
  {
      $cloudcmd = "cp abc xyz ";
      system($cloudcmd,$status);
      if($status != 0)
      {
          sleep(3) ;
          continue ;
      }
      break ;
  }
  </code></pre>
  
  <p>I tried to add echo command after break; but it does not seem to work.</p>