Shortened version of a result from the table (first 15 characters only)

Hi there,

If I used a SELECT query to get this information

Bon Jovi - This is great music and is a great price £9.99
BB King - This is also great music and is on sale too. £3.99

How do I limit the number of characters the result gives me? So it would read ONLY the first 15 characters followed by three dots (.'s)

Bon Jovi - This… £9.99
BB KIng - This … £3.99

I am using:

$a = "SELECT title, price FROM music WHERE title LIKE '{$letter}%'";

how do I SELECT title BUT ONLY the first 15 characters??

Thank you for your help,

Matt.

If you put the title in a variable, you could do:


$title = subtr($title,0,15);

That would limit the title variable to 15 characters.