Hi Friends,
There is a variable call 'ReportID'
Its values are normally in this format. 'MPS141', 'MPS142'....
'MP' means company name. 'S' means, Songs and '14' means year 2014
and other part is auto incrementing data.
I want to get onlye that value.
Is there any function in PHP ?
help me guys
jKidz
0
Junior Poster in Training
Recommended Answers
Jump to PostHi, you can use
substr()
:<?php $reportID = 'MPS141'; echo substr($reportID, 5);
Will return all the characters after
MPS14
, but you can also create a function to return an array of all the elements of thereportID
, an example:function …
All 4 Replies
cereal
1,524
Nearly a Senior Poster
Featured Poster
jKidz
commented:
thanks buddy
+0
shophiarajan47
0
Light Poster
diafol
jKidz
commented:
thanks buddy
+0
jKidz
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.