Search

Friday, October 22, 2010

echo the php code with the help of jquery and css

hello friends,
it's so cool to having work experience with multiple things. In this example i want to share tell a simple way to add css, jquery with php.
here is my example.

$string = "Hello world!";

now we have to give some css in our example

.p_style{
 color:#ff6600;
 background:#ccc;
 padding:5px;
 }

now lets work

on some jquery who's gives a nice look to our output

$(document).ready(function(){
   $('#msg').addClass('p_style');
 });

and now the final output with our html tags after the body start and before the body end

echo "
" . $string . "
";

and you will get a nice and cool output

No comments:

Related Posts Plugin for WordPress, Blogger...