How to remove specific expression from an array
Remove the following element
$value['#434434*siva']
Output :
434434siva
How to remove specific expression from an array
Remove the following element
$value['#434434*siva']
Output :
434434siva
You can use preg_replace('/[^A-Za-z0-9\-]/', '', $string)
to remove all the special characters
<?php
function clean($string)
{
return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
}
?>
Then for array, you can do it like:
<?php
foreach($value as $val)
clean($val);
?>