When you have a foreach loop like below, I know that you can change the current element of the array through $array[$key]
, but is there also a way to just change it through $value
?
foreach($array as $key => $value){
}
It's probably really simple, but I'm quite new to PHP so please don't be annoyed by my question :)