Posts Tagged ‘URL’

Get parameters in url by arg(?) in Drupal

Monday, February 8th, 2010

Get parameters in url by arg(?) in Drupal

Parameters,URL,Drupal

You can easily get the url segment using function arg(?) in Drupal.

For instance:

URL: http://mysite.com/node/150349/edit

arg(0) results ‘node’
arg(1) results ‘150349′
arg(2) results ‘edit’