is it possible to use values that are obtained within a loop/function out side the loop/function where it is used or called?
below is my function
function off($limit)
{
$string=file_get_contents("feed.xml");
$xml=simplexml_load_string($string);
foreach ($xml->FOUND->CAT as $place)
{
$limits = $place->CORDS;
$rate=$place->STARS;
$phone=$place->PHONE;
}
}
Im calling it to a php file which has html tags. Is it possible to get the values that are returned by the function into the rows that are marked by XXXX to display ?
<html>
<body>
<?php
off(‘57854’);
?>
<table width="200" border="1">
<tr>
<td>XXXXX</td>
<td>XXXXX</td>
<td>XXXXX</td>
</tr>
<tr>
<td>XXXXX</td>
<td>XXXXX</td>
<td>XXXXX</td>
</tr>
<tr>
<td>XXXXX</td>
<td>XXXXX</td>
<td>XXXXX</td>
</tr>
</table>
</body>
</html>
I would like to know is there a way to display without including the html tags within the function.
Any help will be appreciated.
Thanks