Tuesday, July 3, 2012

Find if url(current address) contains "?" or not with php

//  how to find the current url contains  the "?" or not
// to verify the current url has the one/single query string variable or many  string variable
function  get_urlsigntype($current_url) {
    if(strpos($current_url, '?') === false) {
        return "?";
    } else {
        return "&";
    }
}

No comments:

Post a Comment