webdevised Posted September 27, 2006 Share Posted September 27, 2006 i have a band show CMS that connects to a DB. in the admin panel I have the code that displays the show venue and with the modify link only.. i don't want the whole venue name displayed all i want is 10 letters of it to be displayed.. can this be done?this is the admin show view code:[code=php:0]<?phpinclude("config.php"); $db = mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbname) or die("Cannot connect to database"); $query = "SELECT * FROM band_shows ORDER BY id"; $result = mysql_query($query); echo "<ul>\n"; while ($r = mysql_fetch_array($result)) { echo "<li><a href=\"admin.php?page=newsmodify&id=$r[id]\">$r[venue]</a></li>\n"; } echo "</ul>\n";?>[/code]thanks.... Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 27, 2006 Share Posted September 27, 2006 http://ca.php.net/manual/en/function.substr.php - the substring function Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.