I apologise if the question was already answered but i didn't find any answer.
In C# i have a basic 'foreach loop' on a Dictionary
foreach(var item in _dict)
{
if(item.Key == "test")
{
item.Value++; // This line will add one more number to the integer 1+1
}
}
What's the equivalent code in PHP?
PHP
foreach($Clients as $cl)
{
if($cl["ChannelID"] == $chanID)
{
$cl['Clients']++;
}
}
However, in C# the append is succesful in the dictionary, but in the PHP array is not, the initial value remains unchanged even if the code was succesful run.
Sorry for my quite noobie question but i don't use PHP much, only asp.net with C#