rtrim() Function | Remove Whitespace From the End of String

Date Published: 02/02/2021Published By: JaiSchool

Example-

<?php

$text = "check ";
if($text == "check")
{
  echo "There is not any whitespace";
}

$wspace_removed = rtrim($text);
if($wspace_removed == "check")
{
  echo "whitespace Removed";
}

?>

Publish A Comment

Leave a Reply

Your email address will not be published.