Let’s say the following is our string with letters and numbers −
$value ="1045632245555fghjklm67535454663443gfdjkbvc9890000006777743";
We ant a specific value beginning from 989 i.e.−
9890000006777743
Example
For this, use substr() along with strpos().
<!DOCTYPE html> <html> <body> <?php $value ="1045632245555fghjklm67535454663443gfdjkbvc9890000006777743"; echo "The actual value is=",$value,"<br>"; $result=substr($value, strpos($value,"989"), 16); echo "The filter value is=",$result; ?> </body> </html>
Output
The actual value is=1045632245555fghjklm67535454663443gfdjkbvc9890000006777743 The filter value is=9890000006777743