Jump to content

Processing an array to form another one


Perad

Recommended Posts

I am converting a site of mine to smarty, however i am having a little trouble creating this array.

 

The problem is that i use a function called textile to parse the text from my database. For textile to work it needs to take in the news variable and process it. In this case it is processing it into "$processedtext".

 

As it is now all it produces is array, for each output. How can i change the bottom 4 lines to display the proper output?

if ($row['newsinbrief'] == NULL) 
{
	$news[] = $row['newstext'];
} 
else 
{
	$news[] = $row['newsinbrief'];
}

$author[] = $row['author'];
$profileid[] = $row['author_id']; 

include_once("../textilephp/Textile.php");
$text[] = $news;
$textile = new Textile;
$processednews[] = $textile->process($text);

Link to comment
https://forums.phpfreaks.com/topic/39016-processing-an-array-to-form-another-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.