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:
$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.
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:
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.
James Murray, London, Domestic Regulator, c1815James M