Get parameter from URL by name

Uses parse_url() to fetch query string param from given URL. Read more.

php
fork add to bundle source
function get_param_from_url($url, $name) { parse_str(parse_url($url, PHP_URL_QUERY), $query); return $query[$name]; }

usage

load_function('get_param_from_url'); echo get_param_from_url('http://my.com/?id=25&other...', 'id'); // 25
← how to use this in app?
create log ...inout