hi
i want to apply url string to my page not by from adress bar of browser (not : http://www.mysite.com/index.php?p=1&r=3&t=1)
i want apply it from one variable that has this url string:
like as:
adressbar: http://www.mysite.com/index.php
$st="?p=1&r=3&t=1"; // here i must access to $p,$r,$t,...
is there any way to do it?
if you mean you want to get the first part "www.mysite.com/index.php" $_SERVER['PHP_SELF'] will do that and not get the rest.
no no in other mean i have a varibale like as this:
$st="?p=1&r=3&t=1"; // here i must can run: echo $r; // and it must print 3
i think first remove ? char form string then use of explode by = and .... ?
Perhaps you want to use [man]parse_str/man?
oh exactly. what a good function was. thanks