Why does PHP foreach not enter
PHP Code
$RSQL =sprintf (Self::getqatt, $CID); $US = $this->mysql->getdata ($RSQl); echo $RSQL; $uc =count ($US); if ($uc >0) { foreach ($US as $u) { echo $u [' UID ']; } }
$uc is clearly greater than 0, why does foreach not enter
------Solution--------------------
Print_r ($US); Look
------Solution--------------------
Before foreach, output the $US.
PHP code
if ($uc >0) {print_r ($US); foreach ($US as $u) {echo "#TEST #"; echo $u [' UID ']; }}
------solution--------------------
discusses
$uc more than 0, why does foreach not enter the br>
------Solution--------------------
That's a problem with the database connection, check it out.
------Solution--------------------
$US = $this->mysql->getdata ($RSQl);
Print_r ($US);
Paste the results to see
------solution--------------------
discussion
No problem, if anything, how can $UC be greater than 0?