We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

iloveitaly on 06/05/09


Tagged

url edit String query set create change extension manipulation kohana


Versions (?)


Kohana Query String URL Extension


Published in: PHP 


  1. <?
  2. class url extends url_Core {
  3. public static function get_query_string(Array $queryVars, $keepOld = false) {
  4. $current = input::instance()->get();
  5.  
  6. if($keepOld) $new = array_merge($current, $queryVars);
  7. else $new = $queryVars;
  8.  
  9. return http_build_query($new);
  10. }
  11. }
  12.  
  13. ?>

Report this snippet 

You need to login to post a comment.