How can I calculate the value of one string containing few values?
For example,
$toPluck = 'price';
$arr = $gamesWorth;
$plucked = array_map(function($item) use($toPluck) {
echo $item[$toPluck];
}, $arr);
The webpage displays 2, 20, and 50.
I want to calculate them both and echo to the page 72.
I tried to find a solution on the web and on that website, but I can't find it..