function arg

6.x misc.inc arg($index)
7.x misc.inc arg($index)
5.x misc.inc arg($index)

Returns the component of the page's path.

When viewing a page at the path "admin/structure/types", for example, arg(0) returns "admin", arg(1) returns "structure", and arg(2) returns "types".

File

includes/misc.inc, line 659
This file contains misc functions for FlightPath

Code

function arg($index) {

  $q = $_REQUEST ["q"];
  $temp = explode("/", $q);

  $rtn = @trim($temp [$index]);

  return $rtn;

}