Jump to content

Tables from Arrays


BigPaul

Recommended Posts

I’m new to PHP and I’m trying to do as much of this as I can on my own but I’m pretty lost when it comes to this… I don’t even know if it’s possible but this is what I’m trying to do.

This is just an example:

$Apples  = 0.50;
$Oranges = 0.65;
$Bananas = 0.30;

$lesterapples = 2
$lesteroranges = 3
$lesterbananas = 0

So I have something like this in one PHP file. In another I’m calling this PHP file in and I’m building tables right now I’ve built the table in html and used the PHP code to display the numbers. I want to possibly do this in an array so that if Lester only has apples and oranges that’s all that shows up in his table.
I hope this makes since LOL  ???

Thanks,
Link to comment
https://forums.phpfreaks.com/topic/34454-tables-from-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.