|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-03 23:20 UTC] johannes@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 15 22:00:01 2025 UTC |
Description: ------------ Granted, you can replicate this by using while($i=0;$i<$times;$i++){ //code here } but that defeats the doctrine of simplicity... Is a language construct such as repeat($times){ //code here } really that much to ask for? My proposal: <b><i>void </i>repeat (<i>$times</i>, <i>[&$counter]</i>)</b> where counter is a reference to a variable that will be incremented upon each iteration.