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

  • SEARCH
  • Home
  • 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 6699127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:39:32+00:00 2026-05-26T06:39:32+00:00

I want increase the student_no, when i click the finish button. student_no : ABS10000

  • 0

I want increase the student_no, when i click the finish button.

student_no : ABS10000

So i want to split the student_no and increase one. How?

Can i use character_limiter()?

$string1 = "ABS100000";
$string1 = character_limiter($string1, 2);

$string2 = "ABS100000";
$string2 = character_limiter($string2, 3,8);
$string = $string + 1;
echo $string1;
echo $string2;

This is correct…

  • 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-05-26T06:39:33+00:00Added an answer on May 26, 2026 at 6:39 am

    You’re using that helper function quite wrong. Also, your code makes little sense at some points.

    character_limiter() belongs to the Text helper, it’s aim is to provide help in formatting, mostly; look at the companion functions and you will see it.

    Also, the third (optional) parameter should be a text appended at the end of the trimmed string, something such an ellipsis, for ex. Your second example, which tells to “limit the string to 3 characters and add and 8 at the end” is just plainly wrong, according to your original intentions.

    I’m not aware of any helper function (here or in other helpers) that can do what you want, but since you’re coding in php, I don’t know why can’t just do something like (I know there might be better ways to do this):

    $string1 = str_replace('ABS','',"ABS100000"); // becomes 100000
    $string1 = intval($string1) + 1; //100000 is cast to INT and then 1 is added;
    $new_string = 'ABS'.$string1; //gives ABS100001;
    

    I’m assuming ‘ABS’ is something fixed and you just want to increment the numerical part of this string.If not, please be more clear in you question and add the relevant informations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to increase my Heap size. How can I use JAVA_OPTS for doing
I need to slow down ViewPager, and I want increase MIN_DISTANCE_FOR_FLING. How can I
I want to increase the clickable area of my button (ImageView). But I don't
For each click I want to increase the font size. $('#fontplus').each(function('click') { var fs
I am new to jquery mobile. I have one problem. I want to increase
I want to increase the padding between the home action bar button < and
How can I increase css values with jquery? I want to increase values such
I want to increase div value +1 in certain events.How can i get div
I want to increase a decimal's smallest fractional part with one so that for
I want to increase my CPU usage through a java program, albeit in a

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.