Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Function for Large Cap?


Recommended Posts



I was wondering if anyone knows how to apply a style for large caps to the first letter in a string? For example, I'm using Linda's new SEC mod with category descriptions and want to apply a style to the first letter in the string. I made a string command for the first letter & applied a <div> tag to it, but it doesn't return anything. I know I'll need a similar string for the rest of the description to trim the 1st letter, but I need some here if anyone is handy with this sort of thing.


Thanks! Here's my feeble attempt...(not working)


    $categories_description_query = tep_db_query("select categories_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $current_category_id . "'");

   $categories_description = tep_db_fetch_array($categories_description_query);

   $categories_description = $categories_description['categories_description'];

   $largcap = substr($categories_description['categories_description'], 1, 1);

   if ($categories_description != '') {



   <td><table border="0" width="100%" cellspacing="0" cellpadding="0">




     <tr class="main">

       <td class="main"><div class="largecap"><?php echo $largecap; ?></div><?php echo $categories_description; ?></td>

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...