I have a string that collects two pieces of information. Everything before the slash is a search variable, and everything after is the page number.
Assume the following:
$search = "classic rock/8"
should be $searchvalue[0]='classic $searchvalue[1]='rock' $searchvalue[x]= etc... and then $page=8
I tried a few approaches, the last one is to do three passes by first removing everything after the slash.
$search=substr($search, 0, strpos($search, '/'));
and then separate the $search values into an array. and then go back (a 3rd time!) and get the page variable by deleting everything before the slash.
I know this is highly inefficient. Is there a way to do these actions in one pass?
Thanks in advance!