Has anyone had a problem where the PHP “echo” function pushes out TWO TAB Characters before your data?
To check it out go here: http://www.redfieldrocks.com/getNewsText.php
Then look at the source.
This data is pulled from a mysql database, I’m trimming the white space with the trim function and I’ve removed all white space in the PHP File.
When the tabs are in front of the variable name, flash does NOT read the variable (because of the tabs).
Here’s the code for the PHP page:
<?php define("BR", "<br>");
$link_id = db_connect();
$query = $myQuery;
$result = mysql_query($query);
if ($row_data = mysql_fetch_array($result))
{
do {
$NewsText .= "<b>" . $row_data[create_date] . "</b>" . BR . str_replace("&", "and", $row_data[header]) . " - " . str_replace("&", "and", $row_data[subhead]) . BR . str_replace("&", "and", $row_data[article]) . BR . BR;
} while ($row_data = mysql_fetch_array($result));
}
else
{
$NewsText= "No news found!";
}
echo trim(stripslashes($NewsText = "NewsText=" . $NewsText));
?>
Any ideas why i’m getting those tabs? Thanks