PDA

View Full Version : format php echo text or feed to flash help



PaulyP
07 Mar 2010, 05:30 AM
Hi.

I have a news page which gets the news items from a mysql database. This is the code I'm using.



<div id="newscontent_title">Latest News</div>

<?php

include "login.php";
$news = mysql_query("SELECT * FROM news");
while ($data = mysql_fetch_array($news)){

echo "" . $data[title];
echo "<p></p>";

echo "" . $data[content];
echo "<p></p><p></p>";
}

?>

</div>

As you can see I pull the title first and then the content of the news artical.

What I'd like to know is how can I format the text displayed on the webpage from "echo "" . $data[title];" with a bold, underline coloured font and then follow that with the data produced by "echo "" . $data[content];" with text without bold, underline and a different colour to the title.


This output of the above is at the moment:



News title 1

News story 1


News Title 2

News Story 2



etc....

but I would prefer to make it look llike this instead:



News title 1

News story 1


News Title 2

News Story 2




What I would really prefer is to be able to use a Flash box to get the text from the php file and display it in flash in stead. That way I can use Flash scroll methods instead of having a standard ugly scroll bar within the div container used above. I'm some what familiar with flash but not integrating PHP with it. If someone could help me with this that would be great but otherwise just the echo formatting above will do for now.


Thanks very much for any help you can give me with this. :)