echo "<span style = 'font-color: #ff0000'> Movie List for {$key} 2013 </span>";
Variables are only expanded inside double quotes, not single quotes. Since the above uses double quotes for the PHP string, I switched to single quotes for the embedded HTML, to avoid having to escape the quotes.
The other problem with your code is that <style>
tags are for entering CSS blocks, not for styling individual elements. To style an element, you need an element tag with a style
attribute; <span>
is the simplest element -- it doesn't have any formatting of its own, it just serves as a place to attach attributes.
Another popular way to write it is with string concatenation:
echo '<span style = "font-color: #ff0000"> Movie List for ' . $key . ' 2013 </span>';