Foreach Array Loop
Posted: Thu Dec 25, 2003 11:25 am
I have this code..yet, it returns the error Invalid Argument Supplied For Foreach. This is the code....
Code: Select all
<?php
$dbname = 'eckbios';
if ($db = sqlite_open($dbname, 0666, $sqliteerror)){
$users = (sqlite_query($db, "SELECT socomname from clanprofile ORDER BY socomname"));
foreach ( $users as $val ) {
?>
<a href="
<?php
echo "pro.php?user=$val";
?>
">
<?php
echo "$val";
?>
</a>
<?php
echo "<br><br>";
}
}
?>