I've got a wordpress site with game titles, and when the title has a lot more than 50 figures I have to add an ellipsis (...) in the finish from the title and prevent the title at 50 figures. Below may be the PHP I'm writing however it appears not to work properly, seeking a PHP guru to train me the right way with this. Any help could be greatly appreciated.

<?php if (strlen("the_title()") > 50) { ?>
                <?php the_title(); ?>
            <?php } if (strlen("the_title()") < 50) { ?>
                <?php echo substr(get_the_title(), 0, 50); ?>...
            <?php } ?>   

The mb_strimwidth function does just that.

echo mb_strimwidth($title, 0, 50, '...');

You are checking the size of the string "the_title()". Take away the quotes, and it'll most likely work (I am not 100% certain of the main difference between your_title() and obtainthe_title(), when i haven't used Wordpress shortly -- you may have to change that around too):

<?php if (strlen(the_title()) > 50) { ?>
                <?php the_title(); ?>
            <?php } if (strlen(the_title()) < 50) { ?>
                <?php echo substr(get_the_title(), 0, 50); ?>...
            <?php } ?>   

or possibly

<?php if (strlen(get_the_title()) > 50) { ?>
                <?php the_title(); ?>
            <?php } if (strlen(get_the_title()) < 50) { ?>
                <?php echo substr(get_the_title(), 0, 50); ?>...
            <?php } ?>   
<?php 
$title  = the_title('','',false);
if(strlen($title) > 60):
    echo trim(substr($title, 0, 65)).'...';
else:
    echo $title;
endif;
?>

Take the_title() from quotes while using the strlen() function.

echo (strlen(the_title())>50) ? (substr(the_title(), 0, 50) . "...") : the_title());

This can be a ternary operator. What it really essentially states is that if the end result from the_title() is much more than 50 figures, then echo the very first 50 figures and so the string .... Otherwise, just echo the end result from the_title().

Read much more about substr here: http://php.net/manual/en/function.substr.php

You'll find information on the ternary operator here: http://php.net/manual/en/language.operators.comparison.php