Code:
echo "<style="color:blue">hi how are u my friends?</style>";
Your not escaping the double quotes inside the double quotes. If your using double quotes and have other double quotes in side of it you need to escape it.

PHP Code:
echo "<style="color:blue">hi how are u my friends?</style>"
Should be

PHP Code:
echo "<style=\"color:blue\">hi how are u my friends?</style>"
Also I might mention you need to change the style tag to a span tag because style tags aren't used in this manner unless this is xml and you'd probably use xstl for that instead of pure css.

PHP Code:
echo "<span style=\"color:blue\">hi how are u my friends?</span>"
or you could just do this

PHP Code:
echo '<span style="color:blue">hi how are u my friends?</span>'
for more on escaping strings check this out

http://php.net/manual/en/language.types.string.php

http://www.homeandlearn.co.uk/php/php7p7.html

Last edited by pein87; 1Jun2011 at 12:06..
shabbir like this