Re: [PHP] URL Parsing Help

2002-01-29 Thread Shane Lambert
Actually, I found a simpler way: $vars = str_replace("/","&",$PATH_INFO); parse_str($vars); But thanks for your help... Christopher William Wesley wrote: > $myPairs = explode( "/", $PATH_INFO ); > while( list( $key, $val ) = each( $myPairs ) ){ > if( !empty( $val ) ){ > $my

Re: [PHP] URL Parsing Help

2002-01-29 Thread Christopher William Wesley
$myPairs = explode( "/", $PATH_INFO ); while( list( $key, $val ) = each( $myPairs ) ){ if( !empty( $val ) ){ $myVar = explode( "=", $val ); ${$myVar[0]} = $myVar[1]; } } For you example URI, "index.php/option=contact/step=view" you would then have $