I am trying to get the best out of a clients website by taking the keywords from their description.
To do this I'm using:
54 because there room for 54 characters on the first line, which in once instance looks like this:PHP Code:$stock_desc_2 = stripslashes(substr(strip_tags($value['stock_desc']),0,54));
The trouble is, although my client has put a <br/> after the first sentence to create the first line, its not stopping at the first line, but picking characters out of the second line to make up the 54.HTML Code:James Murray, London, Domestic Regulator, c1815<BR>James Murray, London, Clockmakers Company, 1815 Listed in Bailey’s as a maker of great repute, this domestic regulator is small and nicely understated. The eight-day movement, with anchor escapement, set in plates supported by four, large, knopped pillars. The 9-inch enamel dial inscribed ‘Murray, London’ and finished with two beautifully pierced steel hands.</
So where I want
I'm actually getting:HTML Code:James Murray, London, Domestic Regulator, c1815
So my question is, is there anyway to grab everything before the <br/> instead of the 54 characters that it is.HTML Code:James Murray, London, Domestic Regulator, c1815James M
http://www.wfbruce.co.uk/item.php?id=1000
Cheers



Reply With Quote


Bookmarks