Hello, Is there a way I can echo an for each variable outside the for each statement?
<?php
foreach ($products as &$value) {
$partnumber = '<PartNumber>'.$value["sku"].'</PartNumber>';
echo $partnumber;
}
?>
I need $partnumber to be echoed in another piece of php code with out using the for each to grab each value.
How can this be done?
*EDIT* - Crap I posted in the wrong forum, still if you can help this would be nice.