I have a url to seperate for a query
something.com/site-fun-sun.htm
how would it be possible to associate the words before the extension .htm
example:
echo "$1"; > = fun
$1=fun $2=sun $3=site
$url = "something.com/site-fun-sun.htm"; $file = basename($url, ".htm"); //$file = site-fun-sun $parts = explode("-", $file); foreach($parts as $one) { echo "$one<br />\n"; } //prints site fun and sun each on own line