Php - Split string after specific length, String Manipulation after specific length

Split string after specific length

Split string into two section after specific length,

String split 2 sections:

This code is not split words.
<?php
 $para="W3calculator, a leading business service based company.";
 if(strlen($para) > $length) {
  echo "Before :".$para;
  $para_title1 = substr($para, 0,strpos($para, ' ', $length));
  $para_title2 = split( $para_title1 , $para);
  echo "After :".$para_title1."";
  echo "After :".$para_title2[1];
 }
 else
  echo $para;
?>

Output:
Before :W3calculator, a leading business service based company.

After :W3calculator,
After : a leading business service based company.

The topic on Php - Split string after specific length is posted by - Math

Hope you have enjoyed, Php - Split string after specific lengthThanks for your time

Tech Bluff