How can I convert a PHP string from "-----071-3234443-----“ to "071-3234443"?
This string should contain a telephone number. But it contains leading and tailoring dashes?
You can use the trim function:
Have a look at http://php.net/manual/en/function.trim.php
$tel = trim($tel, "-");
trim()function will work great for your case. w3resource.com/php/function-reference/trim.php