Hi,
Notice that ,
PHP Code:
array_push($LOGIN_INFORMATION, $row);
$row will only contain array info and not the value itself.
Heres the code that will help u. I have tested it locally and it works.
PHP Code:
<?php
$LOGIN_INFORMATION = array();
$result = mysql_connect($hostname,$user,$pass);
mysql_select_db('info_moosehead');
$query = "SELECT admin_name FROM Portal_administrators";
$result = mysql_query($query);
if( !$result) {
echo mysql_error() . ": " . mysql_errno();
}
while ( $row = mysql_fetch_array($result)) {
array_push($LOGIN_INFORMATION, $row['admin_name']);
}
$totItems = count($LOGIN_INFORMATION); //Contains the total items contained within the array, UPPER BOUND
$i = 0; //LOWER BOUND
while($i<=$totItems){ //Iteration through array, you can also use print_r for raw.
echo $LOGIN_INFORMATION[$i]."<BR>";
$i++;
}
?>
Bookmarks