http://www.srcf.ucam.org/~sas98/e开发者_运维百科nts/index.php
I have a table called ents with a varchar(100) field called week containing the value 'Easter Term 2011, Week 1'. However, the output returns 'Array'.
My code is:
function printWeek() {
    $query = mysql_query("SELECT week FROM ents") or die (mysql_error());
    while ($week = mysql_fetch_array($query, MYSQL_NUM)) {
        echo "$week";
    }
}
Any ideas?
You're calling mysql_fetch_array which returns... wait for it... an array.  You need to access the first element of the array if you want an actual value:
echo $week[0];
mysql_fetch_array fetches array of row data (as the name hints), so you have to threat is as such:
function printWeek() {
    $query = mysql_query("SELECT week FROM ents") or die (mysql_error());
    while ($ents = mysql_fetch_array($query, MYSQL_NUM)) {
        echo $ents[0];
    }
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论