We can use the PHP trim() function to remove whitespace including non-breaking spaces, newlines, and tabs from the start and end of the string. It will not remove whitespace occurs within the…
remove multiple spaces from string in php
1 Article
1