Toodles, y’all! o/ Back again, with a quick question: Is there a less memory intensive way to pull data from an object than the $object->data way? I’m only echoing this about three times in my script before I get the “Allowed memory size of ###### bytes exhausted (tried to allocate ### bytes)” error. I’ve debugged it and it definitely is due to the pulling of data from the $object. Is there any simpler way to retrieve data, or am I just going to have to increase the memory allowance?
Cheers,
Here’s the code, if that helps.
[php]$i = 0;
while ($i < $result->num_rows)
{
$record = $result->fetch_object();
$companyName = strtolower($record->company_name);
$searchFor = "/";
$searchFor .= strtolower($id);
$searchFor .= "/";
if(preg_match($searchFor, $companyName))
{
echo "<html><body><table><tr>";
echo "<td>" . $companyName . "</td>";
echo "<td>" . $record->Address2 . "</td>";
echo "<td>" . $record->Address3 . "</td>";
echo "</table></body></html><button type='button'>See More</button>";
}
$i += 1;
}[/php]