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

Date Published: 02/02/2021 Published 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. Required fields are marked *