<?php $array = ['Dog:110', 'Cat:111', 'Mouse:101']; $result = []; foreach ($array as $v) { $temp = explode(':', $v, 2); $result[$temp[0]] = (int)$temp[1]; } var_export($result);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`