Jump to content

Some help please: how to display only part of an URL


newtothis

Recommended Posts

Hello guys,

 

Any help would be handsome.

 

I have to create a web link extracted from a data base and I just want to display the left part of the URL before a specific character (?).

 

I am looking for the CSS code for this.

 

Has anyone an idea of the simplest way to do it using CSS code.

 

Example:

 

CSS code should be in the form:

 

. firmurladdress { …} ?

 

The HTML code is:

<a href=”<? $ firms-> firmurladdress ?>”><?= $firms->firmurladdress?></a>

 

 

Instead to display (the exact content of the field in the database):

 

http://www.oxfordlane.com?EM

 

I only want to display on the browser:

 

http://www.oxfordlane.com

 

So only what is on the left of “?” should be displayed.

 

Thanks a lot

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...