Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:43:19+00:00 2026-06-07T05:43:19+00:00

I cant seem to figure the best approach to a PHP problem. I want

  • 0

I cant seem to figure the best approach to a PHP problem. I want to accomplish the following

  1. I get a string that is, ie. 1000 characters in lenght
  2. I want to split a string into 2.
  3. The first string need to be 600 characters based on the following condition:
    a) String should only be split if after a period
  4. The second section of the string can be the remainder.

I know how to check the length of a string strlen($string) and I know how to explode a string into substrings using ie. explode(). However, I am not sure how to bring everything together.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:43:20+00:00Added an answer on June 7, 2026 at 5:43 am

    I have used, its works.. you have try this…

    <?php
            $app_title="HIOX INDIA.COM, a leading business web hosting company, is
    
       currently involved in web services, software/application development, web content 
    
       development, web hosting, domain registration, internet solutions and web design.";
    
            echo "<br>Before :".$app_title;
            $length=100; 
            if(strlen($app_title) > $length) { 
            $app_title1 = substr($app_title, 0,strpos($app_title, ' ', $length));}
            $app_title2=split ( $app_title1 , $app_title);
            echo "<br><br>After1 :".$app_title1;
            echo "<br><br>After2 :".$app_title2[1];
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys having this really simple problem but cant seem to figure out have
I am having a problem that I just can't seem to figure out. The
I can't seem to figure out how to get dependency injection to work in
I can't seem to figure out how to get the offsetTop of an element
I can't seem to figure out how to get Objective-c to auto box my
I can't seem to figure out how to get my Ajax form to only
I've gone back and forth on this problem and can't seem to figure out
So I have the following PHP string: $output = {playerId:1178,percentChange:0.1,averageDraftPosition:260,percentOwned:0.1,mostRecentNews:{news:Accardo was called up from
I have what seems a simple enough regex problem that I can't seem to
I can't seem to figure out the best way to handle this. When user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.