Which function allows you to remove spaces at the beginning and end of a string in PHP code example
Example: remove spaces from string php
<?php
$phone = preg_replace( '/\s+/', '', "01234 567890" );
echo $phone;
<?php
$phone = preg_replace( '/\s+/', '', "01234 567890" );
echo $phone;