Jump to content

Have to make "0-9" a link, displaying..


denny911
 Share

Recommended Posts

Hi,i have sort of Yellow Pages for companies integrated on my future site. Visitors have the option of listing them by alphabet.so i have this array:

$arr = array('0-9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');

i managed to make the letters work, but i have no idea how to make that "0-9" part to work when the company name begins with any number from 0 to 9.mySql query looks like this:

$result = " SELECT * FROM $ktg, tbl_korisnici WHERE d_id LIKE '%".$djelatnost."'AND f_grad LIKE '$grad%' AND [b]f_ime LIKE '$slovo%'[/b] AND tbl_firme.k_id = tbl_korisnici.k_idORDER BY f_istaknuto DESC, f_ime ";

text in bold is the part where the array's element is involved.so, i suppose i need to use a regular expression, but i just dont know where to start!please, help!Denis K.

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
 Share

×
×
  • Create New...