4,916,907 results for 'foreach' (369 ms)
Parser.cs https://bitbucket.org/VirtualReality/optional-modules.git | C# | 4,572 lines
42 Variable Variables = new Variable(); 43 foreach (bool l1 in read_termOptions(Options, Variables)) 44 { 44 { 45 foreach (bool l2 in portable_read3(Answer, Variables, new Variable())) 46 { 46 { 47 foreach (bool l3 in remove_pos(Answer, Term)) 48 yield return false; 57 Variable Variables = new Variable(); 58 foreach (bool l1 in read_termOptions(Options, Variables)) 59 { 59 { 60 foreach (bool l2 in YP.current_input(SaveInput)) 61 {CActiveRecordTest.php https://bitbucket.org/penkoh/yii.git | PHP | 1,404 lines
740 $commentCount=0; 741 foreach($users as $user) 742 { 743 $postCount+=count($user->posts); 744 foreach($posts=$user->posts as $post) 745 $commentCount+=count($post->comments); 754 $commentCount=0; 755 foreach($users as $user) 756 { 757 $postCount+=count($user->posts); 758 foreach($posts=$user->posts as $post) 759 $commentCount+=count($post->comments); 783 $commentCount=0; 784 foreach($users as $user) 785 {CActiveFinder.php https://bitbucket.org/penkoh/yii.git | PHP | 1,589 lines
77 $array=array(); 78 foreach($result as $object) 79 $array[$object->$index]=$object; 165 { 166 foreach($this->_joinTree->children as $child) 167 $child->afterFind(); 272 // $with is an array, keys are relation name, values are relation spec 273 foreach($with as $key=>$value) 274 { 379 $prefix='t'.$id.'_c'; 380 foreach($table->getColumnNames() as $key=>$name) 381 { 398 { 399 foreach($this->children as $child) 400 $child->destroy();TreeWalkerChain.php https://bitbucket.org/chives/doctrine2.git | PHP | 692 lines
94 { 95 foreach ($this->_walkers as $walker) { 96 $walker->walkSelectStatement($AST); 108 { 109 foreach ($this->_walkers as $walker) { 110 $walker->walkSelectClause($selectClause); 120 { 121 foreach ($this->_walkers as $walker) { 122 $walker->walkFromClause($fromClause); 132 { 133 foreach ($this->_walkers as $walker) { 134 $walker->walkFunction($function); 145 { 146 foreach ($this->_walkers as $walker) { 147 $walker->walkOrderByClause($orderByClause);product.tpl https://bitbucket.org/marcenuc/prestashop.git | Unknown | 637 lines
55var product_specific_price = new Array(); 56{foreach from=$product->specificPrice key='key_specific_price' item='specific_price_value'} 57 product_specific_price['{$key_specific_price}'] = '{$specific_price_value}'; 91{assign var='textFieldIndex' value=0} 92{foreach from=$customizationFields item='field' name='customizationFields'} 93 {assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"} 93 {assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"} 94 customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array(); 95 customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}'; 95 customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}'; 96 customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if}; 97{/foreach} 534 {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} 535 <li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description"> 536 <h5>shopimporter.php https://bitbucket.org/marcenuc/prestashop.git | PHP | 1,507 lines
291 //get installed module only 292 foreach($exportModules as $key => $module) 293 if ($module->name == $this->name || !(bool)$module->id) 300 $i = 0; 301 foreach($this->supportedImports as $import) 302 { 338 339 foreach($exportModules as $key => $module) 340 (($module->name != $this->name AND $module->id) ? $html .= '<option value="'.$module->name.'">'.$module->displayName.'</option>' : '' ); 356 <div id="importOptionsYesNo">'; 357 foreach($this->supportedImports as $key => $import) 358 { 477 478 foreach($fields as $key => $field) 479 {xmlLoader.php https://bitbucket.org/marcenuc/prestashop.git | PHP | 1,278 lines
161 { 162 foreach ($xml->fields->field as $field) 163 { 180 $sort_entities = array(); 181 foreach ($entities as $key => $entity) 182 { 185 $min = count($entities) - 1; 186 foreach ($dependencies[$entity] as $item) 187 if (($key = array_search($item, $sort_entities)) !== false) 211 // Populate entities 212 foreach ($entities as $entity) 213 $this->populateEntity($entity); 239 $default_lang = null; 240 foreach ($this->languages as $id_lang => $iso) 241 {Clue.pm https://bitbucket.org/tiedemann/uplug.git | Perl | 1,757 lines
115 if (exists $ClueParam{original}){delete $ClueParam{original};} 116 foreach (keys %ClueParam){ 117 if (ref($ClueParam{$_}) ne 'HASH'){$ClueParam{$_}={};} 144 145 foreach $s (sort {$a <=> $b} keys %{$SrcTok}){ 146 foreach $t (keys %{$TrgTok}){ 155 156 foreach (keys %ClueParam){ 157 233 234 foreach $x (@SrcTok){ 235 foreach $y (@TrgTok){ 275# if ($ScoreComb eq 'log-linear'){ # special for log-linear: 276# foreach $x (0..$#{$LinkProb}){ # reverse log (make positiv 277# foreach $y (0..$#{$$LinkProb[$x]}){ # score values)webElements.inc https://bitbucket.org/joaoborsoi/avalanche.git | PHP | 603 lines
13 $sep=explode('&',$params); 14 foreach($sep as $attr){ 15 $attr=str_replace('<Eamp;>','&',$attr); 30 $this->str = "\n".'<div '; 31 foreach($params as $key=>$value) 32 $this->str .= $key.'="'.$value.'" '; 43 $str="\n<div "; 44 foreach($params as $key=>$value) 45 $str .= $key.'="'.$value.'" '; 52 $this->str = '<span '; 53 foreach($params as $key=>$value) 54 $this->str .= $key.'="'.$value.'" '; 65 $str="<span "; 66 foreach($params as $key=>$value) 67 $str .= $key.'="'.$value.'" ';Data.php https://bitbucket.org/mengqing/magento-mirror.git | PHP | 1,514 lines
109 if (!empty($result)) { 110 foreach ($result as &$found) { 111 262 $ret = "001"; 263 foreach ($list as $key => $value) { 264 if (strpos($locale, '_') !== false) { 340 if ($value === 1) { 341 foreach($temp as $key => $value) { 342 if ((is_numeric($key) === false) and ($key != 'QO') and ($key != 'QU')) { 346 } else if ($value === 2) { 347 foreach($temp as $key => $value) { 348 if (is_numeric($key) or ($key == 'QO') or ($key == 'QU')) { 555 $_temp = self::_getFile($locale, '/ldml/dates/calendars/calendar[@type=\'' . $value . '\']/dateTimeFormats/availableFormats/dateFormatItem', 'id'); 556 foreach($_temp as $key => $found) { 557 $temp += self::_getFile($locale, '/ldml/dates/calendars/calendar[@type=\'' . $value . '\']/dateTimeFormats/availableFormats/dateFormatItem[@id=\'' . $key . '\']', '', $key);CActiveRecordTest.php https://bitbucket.org/mpiredda/yii_example.git | PHP | 1,397 lines
740 $commentCount=0; 741 foreach($users as $user) 742 { 743 $postCount+=count($user->posts); 744 foreach($posts=$user->posts as $post) 745 $commentCount+=count($post->comments); 754 $commentCount=0; 755 foreach($users as $user) 756 { 757 $postCount+=count($user->posts); 758 foreach($posts=$user->posts as $post) 759 $commentCount+=count($post->comments); 783 $commentCount=0; 784 foreach($users as $user) 785 {QueryPath.php https://bitbucket.org/antisocnet/drupal.git | PHP | 2,253 lines
156 $found = new SplObjectStorage(); 157 foreach ($document as $item) $found->attach($item); 158 222 $xpath = new DOMXPath($this->document); 223 foreach ($this->matches as $item) { 224 252 $found = new SplObjectStorage(); 253 foreach ($this->matches as $item) { 254 285 $found = new SplObjectStorage(); 286 foreach ($this->matches as $item) { 287 $nl = $xpath->query($query, $item); 308 $matches = array(); 309 foreach ($this->matches as $m) $matches[] = $m; 310 return $matches;CssEventHandler.php https://bitbucket.org/antisocnet/drupal.git | PHP | 1,095 lines
22 23 foreach($dom as $item) { 24 if ($item instanceof DOMNode && $item->nodeType == XML_ELEMENT_NODE) { 52 $a = array(); 53 foreach ($dom as $item) { 54 if ($item->nodeType == XML_ELEMENT_NODE) { 79 $result = new SplObjectStorage(); 80 foreach($this->alreadyMatched as $m) $result->attach($m); 81 foreach($this->matches as $m) $result->attach($m); 88 $matches = $this->candidateList(); 89 foreach ($matches as $item) { 90 104 $found = new SplObjectStorage(); 105 foreach ($matches as $item) { 106scss.inc.php https://bitbucket.org/Pathou/template.git | PHP | 3,759 lines
85 86 foreach ($target as $part) { 87 if (isset($this->extendsMap[$part])) { 108 $counts = array(); 109 foreach ($single as $part) { 110 if (!is_string($part)) return false; // hmm 112 if (isset($this->extendsMap[$part])) { 113 foreach ($this->extendsMap[$part] as $idx) { 114 $counts[$idx] = 119 120 foreach ($counts as $idx => $count) { 121 list($target, $origin) = $this->extends[$idx]; 139 140 foreach (array($base, $other) as $single) { 141 foreach ($single as $part) {scss.inc.php https://bitbucket.org/Pathou/autres.git | PHP | 3,577 lines
83 84 foreach ($target as $part) { 85 if (isset($this->extendsMap[$part])) { 106 $counts = array(); 107 foreach ($single as $part) { 108 if (!is_string($part)) return false; // hmm 110 if (isset($this->extendsMap[$part])) { 111 foreach ($this->extendsMap[$part] as $idx) { 112 $counts[$idx] = 117 118 foreach ($counts as $idx => $count) { 119 list($target, $origin) = $this->extends[$idx]; 137 138 foreach (array($base, $other) as $single) { 139 foreach ($single as $part) {language-function-foreach.xml https://bitbucket.org/hallgrennetworks/smarty.git | XML | 499 lines
5<sect1 id="language.function.foreach"> 6 <title>{foreach},{foreachelse}</title> 7 <para> 7 <para> 8 <varname>{foreach}</varname> はデータの配列をループするために使います。<varname>{foreach}</varname> 9 は <link linkend="language.function.section"><varname>{section}</varname></link> ループよりもシンプルできれいな構文で、 12 <para> 13 <varname>{foreach $arrayvar as $itemvar}</varname> 14 </para> 15 <para> 16 <varname>{foreach $arrayvar as $keyvar=>$itemvar}</varname> 17 </para> 19 <para> 20 この foreach 構文は、名前つき属性を受け付けません。この構文は Smarty 3 21 で新しく導入されたものですが、Smarty 2.x 形式のlanguage-function-foreach.xml https://bitbucket.org/hallgrennetworks/smarty.git | XML | 457 lines
5<sect1 id="language.function.foreach"> 6 <title>{foreach},{foreachelse}</title> 7 <para> 15 mais <emphasis role="bold">ne peut être utilisé que pour des tableau simple</emphasis>. 16 Chaque <varname>{foreach}</varname> doit aller de paire avec une balise fermante 17 <varname>{/foreach}</varname>. 62 <entry><emphasis>n/a</emphasis></entry> 63 <entry>Le nom de la boucle foreach, qui nous permettra 64 d'accéder à ses propriétés.</entry> 175 comme la fonction PHP 176 <ulink url="&url.php-manual;foreach"><varname>foreach</varname></ulink>. 177 </para> 346{foreach from=$myArray item=i name=foo} 347{$smarty.foreach.foo.index}|{$smarty.foreach.foo.iteration}, 348{/foreach}language-function-foreach.xml https://bitbucket.org/hallgrennetworks/smarty.git | XML | 532 lines
3<sect1 id="language.function.foreach"> 4 <title>{foreach},{foreachelse}</title> 5 <para> 5 <para> 6 <varname>{foreach}</varname> is used for looping over arrays of data. <varname>{foreach}</varname> has a simpler and cleaner syntax than the <link linkend="language.function.section"><varname>{section}</varname></link> loop, and can also loop over associative arrays. 7 </para> 15 <para> 16 This foreach syntax does not accept any named attributes. This syntax is new to Smarty 3, however the Smarty 2.x syntax <literal>{foreach from=$myarray key="mykey" item="myitem"}</literal> is still supported. 17 </para> 62 <para> 63 The <literal>$var@property</literal> syntax is new to Smarty 3, however when using the Smarty 2 <literal>{foreach from=$myarray key="mykey" item="myitem"}</literal> style syntax, the <literal>$smarty.foreach.name.property</literal> syntax is still supported. 64 </para> 67 <para> 68 Although you can retrieve the array key with the syntax <literal>{foreach $myArray as $myKey => $myValue}</literal>, the key is always available as <varname>$myValue@key</varname> within the foreach loop. 69 </para>CompileForeachTests.php https://bitbucket.org/hallgrennetworks/smarty.git | PHP | 201 lines
64 { 65 $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{$x}{foreachelse}else{/foreach}total{$smarty.foreach.foo.total}'); 66 $this->assertEquals("0123456789total10", $this->smarty->fetch($tpl)); 74 { 75 $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{$smarty.foreach.foo.index}{$smarty.foreach.foo.iteration}{foreachelse}else{/foreach}'); 76 $this->assertEquals("011223344556677889910", $this->smarty->fetch($tpl)); 84 { 85 $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{if $smarty.foreach.foo.first}first{/if}{if $smarty.foreach.foo.last}last{/if}{$x}{foreachelse}else{/foreach}'); 86 $this->assertEquals("first012345678last9", $this->smarty->fetch($tpl)); 94 { 95 $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1]}{$x}{foreachelse}else{/foreach}{if $smarty.foreach.foo.show}show{else}noshow{/if}'); 96 $this->assertEquals("01show", $this->smarty->fetch($tpl)); 114 { 115 $tpl = $this->smarty->createTemplate('eval:{foreach [9,8,7,6,5,4,3,2,1,0] x y foo}{$y}{$x}{foreachelse}else{/foreach}total{$smarty.foreach.foo.total}'); 116 $this->assertEquals("09182736455463728190total10", $this->smarty->fetch($tpl));ActivityEditView.tpl https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git | Smarty Template | 1,041 lines
101 <!-- included to handle the edit fields based on ui types --> 102 {foreach key=header item=data from=$BLOCKS} 103 {if $header neq $APP.LBL_CUSTOM_INFORMATION && $header neq 'LBL_RECURRENCE_INFORMATION' && $header neq getTranslatedString('LBL_RELATED_TO')} 111 {/if} 112 {/foreach} 113 {if $ACTIVITY_MODE neq 'Task'} 128 <tr> 129<!-- {foreach key=tyeparrkey item=typearr from=$ACTIVITYDATA.activitytype} 130 {if $typearr[2] eq 'selected' && $typearr[1] eq 'Call'} 139 {/if} 140 {/foreach}--> 141 <select name="activitytype" class="small"> 141 <select name="activitytype" class="small"> 142 {foreach item=arr from=$ACTIVITYDATA.activitytype} 143 {if $arr[0] eq $APP.LBL_NOT_ACCESSIBLE}