[development] Drupal 6.x hook_menu question regarding use of wildcards
jpetso at gmx.at
Fri Feb 15 21:23:37 UTC 2008
On Friday, 15. February 2008, Ron Parker wrote:
> Chris Johnson wrote:
> >Um, array(3)->nid is not valid PHP syntax. Is that what you really meant?
> That's my question. I'm trying to figure out if the wildcard value can
> be used in such a way. In my example, the wildcard is %node, which is
> equal to ($node = node_load(arg(3)). array(3) is now equal to $node.
No, array(3) is equal to (in print_r() syntax)
 => 3
and the menu system just uses this standard PHP array as callback argument in
order to get the real number (and from that, the node itself).
I mean, don't get me wrong - I understand your point, just make sure you
recognize that this isn't any special node system syntax but standard PHP.
More information about the development