• Resolved jasonjasonjason

    (@jasonjasonjason)


    good evening,

    i am looking for a method to parse a string, to facilitate different text decoration for the first letter and the remaining letters of that string.

    currently i am using the following code to extract the text name for categories on a given post :

    <?php $category = get_the_category(); $firstCategory = $category[0]->cat_name; echo $firstCategory;?>

    is there a way to parse $firstCategory into separate strings for the first letter and remaining letters?

    hoping to be able to implement something like :

    <span class="h1"> <?php echo $firstCatfirstLetter;?></span>
    <span class="standard> <?php echo $firstCatRemaining;?></span>

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to parse a string for seperate font effects for First / Remaining letters?’ is closed to new replies.