Re: storing array in mysql

From: Date: Tue, 31 Jul 2001 05:18:56 +0000
Subject: Re: storing array in mysql
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-60337@lists.php.net to get a copy of this message
> a:4:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"3";i:3;s:1:" > > When I output this to the screen I get the same as above. But when I > try to echo the unserialized result I get nothing. I am using: > echo $db_result->lists_actual (nothing is returned) Show more code... Also use "View Source" in your browser to see what you are *REALLY* getting. > > If I try to display the result using foreach I get the warning > "Invalid argument supplied for foreach()". I am using: > $array = unserialize($db_result->lists_actual); > foreach($array AS $val) { > echo $val; > }; > > I hope the problem is clear, I am thoroughly confused at this stage! I > should admit that I am only just getting used to arrays... What is the datatype of your lists_actual field in your database? -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#60337) next »