I want to change the value of an array without loop-
Example code:
<?php
//current array
$ids = array('1113_1', '1156_6', '1342_16', '1132_3', '1165_2');
//result should be looks like this
$ids = array('1113', '1156', '1342', '1132', '1165');
?>
is it possible to do it without any loop?
Try this using
array_map():Demo: http://codepad.org/iGJ3cJW2