Jump to content

[SOLVED] STRPOS();


denoteone

Recommended Posts

no. If you want to go that route, you would use the position returned and use substr starting at that position+2 (+1 for the space, +1 more for the starting position of the zip code).

 

Or you could do

$text = ' This is your PostalCode: 12353 enjoy!';
preg_match("~PostalCode: (\d{5})~",$text,$code);
echo $code[1];

Link to comment
https://forums.phpfreaks.com/topic/153950-solved-strpos/#findComment-809117
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.