Welcome Guest, Not a member yet? Register   Sign In
Getting and Comparing Data in Foreach best pratice
#3

(This post was last modified: 11-27-2018, 10:13 AM by soneax.)

Hi, sorry, when i mention table i wanted to say MySQL tables.

Here's an example:


PHP Code:
<?php
 
foreach($things as $thing) {
    echo 
$thing['id'];
 }
?>


I want to use $thing['id'] to query another MySQL table to get child data from this ID. This will be showed in a Dashboard front page to calculate costs.
Reply


Messages In This Thread
RE: Getting and Comparing Data in Foreach best pratice - by soneax - 11-27-2018, 10:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB