0

In PHP, we have $GET which translates to req.query in nodeJS and we have $POST which translates to req.body in nodeJS

so how do you get req.params in PHP?

For example my request URL is http://cat.api/cat/steven

In Nodejs if we use route /cat/:name we can get req.params.name //steven How do we get the same data using PHP?

Kenichi Shibata
  • 148
  • 2
  • 11

1 Answers1

-1

See PHP - parse current URL

See the documentation here: http://php.net/parse_str

Community
  • 1
  • 1
taco
  • 1,367
  • 17
  • 32