Jump to content

Recommended Posts

i have a sting which is 18 characters in length. the first character starts off with either a 'P' or a 'Q' followed by 17 numerics. (something like this:P12220070806181242 or Q12220071030162349).

 

i do not have enough room on the screen to display this entire string as it is. I want to crop it. would like to display the first character('P' or 'Q') followed by the last 8 digits(06181242 or 30162349). how can i do this? the string should show up as

Q30162349 or P06181242 to be able to save space on the display screen.

 

any help will be greatly appreciated. thanx

Link to comment
https://forums.phpfreaks.com/topic/75506-solved-help-with-string-manipulation/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.