<?php
function deslug_array_values($getvars) {
$new_array = array();
foreach ($getvars as $key=>$value) {
$new_value = str_replace("-", " ", $value);
$new_value = str_replace("+", "-", $new_value);
$new_key = str_replace("-", " ", $key);
$new_key = str_replace("+", "-", $new_key);
$new_array[$new_key] = $new_value;
}
return $new_array;
}
var_dump(deslug_array_values(
[
'testing this',
'testing-this++',
'testing+this-too okay'
]
);
- Output for 5.4.0 - 5.4.23
- Parse error: syntax error, unexpected ';' in /in/0e2A0 on line 23
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected '[', expecting ')' in /in/0e2A0 on line 17
Process exited with code 255.
preferences:
180.06 ms | 1395 KiB | 60 Q