Home  >  Q&A  >  body text

PHP separate two strings

I need a code to get the first and second number from a PHP string.

$string = "ACCESS_NUMBER:160375356:13176570247"; $stringOne = ""; $stringTwo = ""; I need a code that can get 160375356 and store it in $stringOne and also get this 13176570247 and store it in string $stringTwo

I don't want to count the string, I need a code that can get the string via: sign

P粉491421413P粉491421413223 days ago367

reply all(1)I'll reply

  • P粉875565683

    P粉8755656832024-04-03 00:51:12

    There are already a lot of answers here, but not a really clean answer yet. How about it:

    
    

    See: https://3v4l.org/GjOUH

    reply
    0
  • Cancelreply