note 31764 added to function.sizeof

From: Date: Fri, 02 May 2003 19:07:57 +0000
Subject: note 31764 added to function.sizeof
Groups: php.notes 
Request: Send a blank email to php-notes+get-47400@lists.php.net to get a copy of this message
I have the following table: CREATE TABLE test ( cp1 tinyint(3) unsigned default '0', cp2 tinyint(3) unsigned default '0', cp3 tinyint(3) unsigned default '0', cp4 tinyint(3) unsigned default '0' ) TYPE=MyISAM; <?php mysql_connect("localhost","root",""); mysql_select_db("System"); $result = mysql_query("select * from test"); $fetch = mysql_fetch_array($result); echo(sizeof($fetch)); ?> The output of the function sizeof would have to be 4, however it is returned 8. This would be a problem of the version of the PHP or the MySQL? I am using MySQL 4.0.12 and PHP 4.3.1. Sorry for my bad English. Ricardo Guedes Brazil - Amazonas - Manaus -- http://www.php.net/manual/en/function.sizeof.php http://master.php.net/manage/user-notes.php?action=edit+31764 http://master.php.net/manage/user-notes.php?action=delete+31764 http://master.php.net/manage/user-notes.php?action=reject+31764

« previous php.notes (#47400) next »