Difference between revisions of "Template:Unique values"
From HodHood
P.Astakhov (talk | contribs) |
P.Astakhov (talk | contribs) |
||
Line 4: | Line 4: | ||
$val = explode( ', ', $argv[2] ); | $val = explode( ', ', $argv[2] ); | ||
foreach ( $val as $v ) { | foreach ( $val as $v ) { | ||
− | $count[$v]++; | + | if ( isset( $count[$v] ) ) { |
+ | $count[$v]++; | ||
+ | } else { | ||
+ | $count[$v] = 1; | ||
+ | } | ||
//$count[$v][] = $page; | //$count[$v][] = $page; | ||
} | } |
Revision as of 06:48, 23 February 2018
PhpTags Notice: Undefined index: 1 in Template:Unique values on line 3
PhpTags Notice: Undefined index: 2 in Template:Unique values on line 4
PhpTags Warning: explode() expects parameter 2 to be string, NULL given in Template:Unique values on line 4
PhpTags Warning: Invalid argument supplied for foreach() in Template:Unique values on line 5