Home  >  Q&A  >  body text

How to get the last/following value of url in php? 【Help】

How to get the last/following value of url in php?

For example

http://127.0.0.1/?index/t/1

The last one is 1

How? If you use get to get this 1, it will be /t/?id=1. It feels good sb

Is there any other way, guys

CcDalaoCcDalao2324 days ago9411

reply all(6)I'll reply

  • 天边

    天边2018-09-10 12:14:47

    emmm, try using / to break it into an array, and then take the second to last and first number of the array

    reply
    0
  • Adolph

    Adolph2018-08-03 14:21:14

    parseurl can

    reply
    0
  • Adolph

    Adolph2018-08-03 14:24:31

    server can also

    reply
    0
  • Chen_YR

    Chen_YR2018-07-04 11:42:28

    I download a bunch of string functions from Baidu, intercept, explode and so on. Come on, your basics are worse than mine

    reply
    3
  • CcDalao

    OK, thank you

    CcDalao · 2018-07-04 12:20:35
  • 请抬头

    请抬头2018-07-02 14:36:03

    Use print


    reply
    0
  • CcDalao

    CcDalao2018-07-02 13:48:33

    I don’t use tp framework

    reply
    1
  • Cancelreply