Drupal print url args


/ Published in: PHP
Save to your folder(s)

To print out Drupal Arguments.


Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. print '<div align="left">';
  4. print '<br/>arg-0 :' .arg(0);
  5. print '<br/>arg-1 :' .arg(1);
  6. print '<br/>arg-2 :' .arg(2);
  7. print '<br/>q:' . $_GET['q'];
  8.  
  9. $view = $GLOBALS['current_view'];
  10. $args = $view->args;
  11.  
  12. print '<br/>args-0 :' .$args[0];
  13. print '<br/>args-1 :' .$args[1];
  14.  
  15. print '</div>';
  16.  
  17. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.