Ok, guys. So what im trying to do is add a style to my echo, and also to the information that is called from my form. The was i have it set up now will change the color and position, but it also prints the {$ } calls. How do i get it to format everything correctly, and the information that is being imputed into the form. Sorry, im new at php, so if im not making sense just tell me. <?php echo '<p style="text-align: center;"><span style="font-size: large; font-family: georgia,palatino; color: #003366;</span></p> This is a {$mandate} {$compname} {$make} {$modelnum} {$wii} </br>;' ?> PHP:
I know what it is. You are telling it to print the variable names as a string. Do it like this: echo '<p style="text-align: center;"><span style="font-size: large; font-family: georgia,palatino; color: #003366;</span></p> This is a' . $mandate . $compname . $make . $modelnum . $wii</br>;' PHP: I'm pretty sure there's a quicker way, but this should work. if not, just ask again.
<?php echo "<p style='text-align: center;'><span style='font-size: large; font-family: georgia,palatino; color: #003366;'></span></p> This is a {$mandate} {$compname} {$make} {$modelnum} {$wii} </br>"; ?> or <?php echo "<p style=\"text-align: center;\"><span style=\"font-size: large; font-family: georgia,palatino; color: #003366;\"></span></p> This is a {$mandate} {$compname} {$make} {$modelnum} {$wii} </br>"; ?>
Im trying to get this code to print inside a tinymce editor and have the style already configured so you don't have to go in and re style everything each time. Im going from a form where you put in information, and trying to have that information print inside the tinymce with the style (color, placing, etc) already added. I figured out how to get my items to print inside the tinymce, just cant figure out how to have the style already added.
ok i figured it out.. the right way to do it is like this: echo "<p style='text-align: center;'><span style='font-size: large; font-family: georgia,palatino; color: #003366;'> This is a {$mandate} {$compname} {$make} {$modelnum} {$wii} </span></p> </br>"; Code (markup):