@
anoopmail;10984364 wrote:I would suggest to upgrade to a database system. Menawhile you try,
replace
if($i>=2) break;
with
if($i>=2) break;
$i++;
Still doesn't work, and I know why, but don't know how to solve, perhaps you know the solution:
$result = $db->getall(lp_month);
$i = 0;
foreach ($result as $item){
show_record($item);
if ($i >= 2)
break;
$i++;
}
This works except for the break; - I need to explode the flat file to read each record individually, then add to the foreach(). Since this is flat file, when calling the function getall() the file comes flat as a single file, no matter how many records on it, records = 1 or records = 100 is the same at this point. Therefore break; does not work because all records come as single record - when breaking still show all.
What I want to do is explode the records, count them, and based on my if statement post:
if $i == 0 echo "content1";
if $i == 1 echo "content2";
if $i > 1 echo "content 3";
But here is the problem I can not call $file to read, it does not allow, I would need to use one of the functions included in the ffdb.inc.php (attached), but I literally tired them all, all I get is ARRAY and not the file itself.
I am so behing on my work, that at this point would be a lot work to convert to mysql, besides I have a few limitations would prevent to use...so I need to continue using FFDB, can you recommend anyone that could help with this? I just need to solve this to publish it, almost ready, getting frustrared.
Thanks a lot!!! 😉
I got held here for the past 3 days...exhausted all solutions.