Get parameters in url by arg(?) in Drupal

February 8th, 2010 by Bruce Dou Views:470

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’

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • 豆瓣
  • DZone
  • LinkedIn
  • MySpace
  • Reddit
  • RSS

Also see:

Tags: , ,

Leave a Reply