Get the NID from url Possible Duplicate:
  Get a node ID from the URL  




I have two content types which one referenced to another by url widget, when i click on the link the node id passing with the url.
How can i get this nid from the url?
Is there some function for that?
Thanks
If you are wanting to use the nid of the node reference field inside a node template, you could grab it as $node-&gt;FIELDNAME[0]['nid'] (D6 anyway, add an ['und'] or something similar in the mix for D7 :)  Otherwise, a lot of other examples are given in the article @refineo references above.