array_map to intval ;-)
$array = ["123", "34", "223"];
$integerIDs = array_map('intval', $array);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello ,
How to convert this string
'["382","266","18","60"]'
to int array
[382,266,18,60]
Thanks
Please or to participate in this conversation.