So I've successfully managed to get a movie title and video title to display via the following code. My question is how do I force the first letters of the output to be captilized?
I know is CSS you would do something along the lines of {text-transform:capitalize;} but how do you implement this sort of thing in PHP?
<?php echo $movtitle.' '.$vidtitle;?>
<?php echo ucwords($movtitle.' '.$vidtitle);?>
http://php.net/manual/en/function.ucwords.php
You could've googled that easily!
It sounds like you're looking for the ucwords()
function in PHP.
If you want to upper case the first character of each word, use ucwords, or you can use ucfirst (for just the initial character in the string) or strtoupper to upper-case the entire string.
Incidentally, it's worth getting to know the various PHP string functions (and indeed array functions), as time invested in this now will pay dividends later.