Jump to content

[SOLVED] Grabbing part of a string/integer


9three

Recommended Posts

Hey,

 

does anyone know a way to grab a part of a string or integer?

 

$string = 'Hello World!';

$int = 123456789;

 

The tricky part is that the string we always be different as well as the int. I want to pull the last 4 of that integer (6789) or the last 4 of that string (rld!)

 

I'm not sure if there is a function for this?

Link to comment
https://forums.phpfreaks.com/topic/162907-solved-grabbing-part-of-a-stringinteger/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.