Page 1 of 1

[SOLVED] array into one variable output

Posted: Fri Oct 29, 2004 6:29 am
by irealms
output array contents into variable?

i have this code

Code: Select all

<?php
		while ($orow = mysql_fetch_assoc($oq))
	{
		$afforders[] = $orow['orderno'];
	}
	foreach ($afforders as $afforders) 
		{
	 echo ''.$afforders.',';
	}

?>
and it outputs in a string, but i need to output that string into one variable? can't seem to get it to work atm.

Posted: Fri Oct 29, 2004 7:00 am
by kettle_drum
[php_man]implode()[/php_man]

or

Code: Select all

$var .= $next_element;