- Get link
- X
- Other Apps
Today eabhyas come up with a Query String function. This function is useful to get the Query String from URL.
This Function is used to get current filename with first parameter(Query String) from URL using PHP function.
Function:
function rns_QueryString_first($incomingURL){
preg_match('/[^&]+/', $incomingURL, $match);
return $outgoingURL = $match[0];
}
Example:
$path="property_add?id=3&aa=aa&b=123";
define('RNSFIFQ', rns_QueryString_first($path));
echo RNSFIFQ;
Output:
property_add?id=3
This Function is used to get current filename with first parameter(Query String) from URL using PHP function.
Function:
function rns_QueryString_first($incomingURL){
preg_match('/[^&]+/', $incomingURL, $match);
return $outgoingURL = $match[0];
}
Example:
$path="property_add?id=3&aa=aa&b=123";
define('RNSFIFQ', rns_QueryString_first($path));
echo RNSFIFQ;
Output:
property_add?id=3
I read this article, it is really informative one. Your way of writing and making things clear is very impressive. Thanking you for such an informative article .. Website Consultant Service Provider Kuwait
ReplyDelete