How to get the value from the url in the function argument?
What you are looking for is either:


arg() function:


  Returns a component of the current Drupal 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".

or Callback Arguments: 

function mymodule_menu() {
    $items['abc/def'] = array(
      'page callback' =&gt; 'mymodule_abc_view',
      'page arguments' =&gt; array(1, 'foo'),
    );
    return $items;
  }


When path 'abc/def' is requested, the page callback function will get 'def' as the first argument and (always) 'foo' as the second argument.