generate functionWed, 21 Dec 2022

remove domain from url dynamically

function remove_domain_from_url( $url = NULL ) { if ( $url ) { $array = parse_url( $url ); $output = $array["path"]; } else { $output = NULL; } return $output; } remove_domain_from_url( 'https://digwp.com/2016/08/wordpress-functions-php-template-part/' );

Questions about programming?Chat with your personal AI assistant