<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: Serialization &amp; Unserialization explanation, code &amp; example</title>
	<atom:link href="http://www.tanzilo.com/2008/12/31/php-serialization-unserialization-explanation-code-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tanzilo.com/2008/12/31/php-serialization-unserialization-explanation-code-example/</link>
	<description>Talks on Web Technology and Better Product Development</description>
	<lastBuildDate>Fri, 23 Jul 2010 21:02:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: sasasa</title>
		<link>http://www.tanzilo.com/2008/12/31/php-serialization-unserialization-explanation-code-example/comment-page-1/#comment-690</link>
		<dc:creator>sasasa</dc:creator>
		<pubDate>Sun, 21 Feb 2010 20:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.tanzilo.com/?p=62#comment-690</guid>
		<description>thanks for this memo about php serialize... it&#039;s a good explaination... didn&#039;t know about __sleep and __wakeup methods..

I often use serialization in my job to store object in db, and more often to save lots of data in db when I don&#039;t want to create a column for each data...

I created a very simple tool to help me read serialized data, and to recover mis written serialized data (for example  : truncated serialized token, etc.).. maybe this will help other people ;)

http://unserialize.net

C u,
Marc</description>
		<content:encoded><![CDATA[<p>thanks for this memo about php serialize&#8230; it&#8217;s a good explaination&#8230; didn&#8217;t know about __sleep and __wakeup methods..</p>
<p>I often use serialization in my job to store object in db, and more often to save lots of data in db when I don&#8217;t want to create a column for each data&#8230;</p>
<p>I created a very simple tool to help me read serialized data, and to recover mis written serialized data (for example  : truncated serialized token, etc.).. maybe this will help other people <img src='http://www.tanzilo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://unserialize.net" rel="nofollow">http://unserialize.net</a></p>
<p>C u,<br />
Marc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amy Collins</title>
		<link>http://www.tanzilo.com/2008/12/31/php-serialization-unserialization-explanation-code-example/comment-page-1/#comment-630</link>
		<dc:creator>Amy Collins</dc:creator>
		<pubDate>Thu, 12 Nov 2009 20:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.tanzilo.com/?p=62#comment-630</guid>
		<description>You rock.  Thanks so much for this explanation!</description>
		<content:encoded><![CDATA[<p>You rock.  Thanks so much for this explanation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Man</title>
		<link>http://www.tanzilo.com/2008/12/31/php-serialization-unserialization-explanation-code-example/comment-page-1/#comment-549</link>
		<dc:creator>Man</dc:creator>
		<pubDate>Tue, 12 May 2009 12:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.tanzilo.com/?p=62#comment-549</guid>
		<description>Could you fix my unserialize code, plizz

==index.php
&lt;?php
print&quot;FAVOURITE COLOURS&quot;;
print&quot;&quot;;
print&quot;Name : &quot;;
print&quot;Colours :&quot;;
print&quot;Red&quot;;
print&quot;Blue&quot;;
print&quot;Green&quot;;
print&quot;White&quot;;
print&quot;Size : S&quot;;
print&quot;M&quot;;
print&quot;L&quot;;
print&quot;&quot;;
print&quot;&quot;;
print&quot;&lt;a href=&#039;vdata.php&#039; rel=&quot;nofollow&quot;&gt;View Data&lt;/a&gt;&quot;;
?&gt;
==end script

==saveindex.php
&lt;?php
$connect=mysql_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;yulisman&quot;) or die (&quot;Conn Failed&quot;);

$colors = serialize($chkColours);
$sql=&quot;insert into mycolors_tb (name,colors,size)
values (&#039;$name&#039;,&#039;$colors&#039;,&#039;$size&#039;)&quot;;
$qry=mysql_db_query(&quot;mycolors_db&quot;,$sql,$connect);

if ($qry) 
	{ print &quot;Data Saved&quot;; }
else 
	{ print &quot;Save Failed&quot;; }
	
print&quot;&lt;a href=&#039;index.php&#039; rel=&quot;nofollow&quot;&gt;Main&lt;/a&gt;&quot;;
print&quot;&lt;a href=&#039;vdata.php&#039; rel=&quot;nofollow&quot;&gt;View Data&lt;/a&gt;&quot;;
?&gt;
==end script

==vdata.php
&lt;?php
$connect=mysql_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;yulisman&quot;) or die (&quot;Conn Failed&quot;);

$query=&quot;SELECT * FROM mycolors_tb ORDER BY noid ASC&quot;;
$doQuery=mysql_db_query(&#039;mycolors_db&#039;,$query,$connect);
$numrows=mysql_num_rows($doQuery);

print &quot;&lt;table border=&#039;1&#039;&quot;;
print &quot;No. ID&quot;;
print &quot;Name&quot;;
print &quot;Colours&quot;;
print &quot;Size&quot;;

// can you make unserialize code for me, plizzz. I want 2 display the data in table
// i tried, but the result is terrible

while ($row=mysql_fetch_row($doQuery))
{ 
 print &quot;$row[0]&quot;;
 print &quot;$row[1]&quot;;
 print&quot;$row[2]&quot;;
 print &quot;$row[3]&quot;;
}
print &quot;&quot;;						
?&gt;
==end script
Thanks</description>
		<content:encoded><![CDATA[<p>Could you fix my unserialize code, plizz</p>
<p>==index.php<br />
&lt;?php<br />
print&#8221;FAVOURITE COLOURS&#8221;;<br />
print&#8221;";<br />
print&#8221;Name : &#8220;;<br />
print&#8221;Colours :&#8221;;<br />
print&#8221;Red&#8221;;<br />
print&#8221;Blue&#8221;;<br />
print&#8221;Green&#8221;;<br />
print&#8221;White&#8221;;<br />
print&#8221;Size : S&#8221;;<br />
print&#8221;M&#8221;;<br />
print&#8221;L&#8221;;<br />
print&#8221;";<br />
print&#8221;";<br />
print&#8221;<a href='vdata.php' rel="nofollow">View Data</a>&#8220;;<br />
?&gt;<br />
==end script</p>
<p>==saveindex.php<br />
&lt;?php<br />
$connect=mysql_connect(&#8220;localhost&#8221;,&#8221;root&#8221;,&#8221;yulisman&#8221;) or die (&#8220;Conn Failed&#8221;);</p>
<p>$colors = serialize($chkColours);<br />
$sql=&#8221;insert into mycolors_tb (name,colors,size)<br />
values (&#8216;$name&#8217;,'$colors&#8217;,'$size&#8217;)&#8221;;<br />
$qry=mysql_db_query(&#8220;mycolors_db&#8221;,$sql,$connect);</p>
<p>if ($qry)<br />
	{ print &#8220;Data Saved&#8221;; }<br />
else<br />
	{ print &#8220;Save Failed&#8221;; }</p>
<p>print&#8221;<a href='index.php' rel="nofollow">Main</a>&#8220;;<br />
print&#8221;<a href='vdata.php' rel="nofollow">View Data</a>&#8220;;<br />
?&gt;<br />
==end script</p>
<p>==vdata.php<br />
&lt;?php<br />
$connect=mysql_connect(&#8220;localhost&#8221;,&#8221;root&#8221;,&#8221;yulisman&#8221;) or die (&#8220;Conn Failed&#8221;);</p>
<p>$query=&#8221;SELECT * FROM mycolors_tb ORDER BY noid ASC&#8221;;<br />
$doQuery=mysql_db_query(&#8216;mycolors_db&#8217;,$query,$connect);<br />
$numrows=mysql_num_rows($doQuery);</p>
<p>print &#8220;&lt;table border=&#8217;1&#8242;&#8221;;<br />
print &#8220;No. ID&#8221;;<br />
print &#8220;Name&#8221;;<br />
print &#8220;Colours&#8221;;<br />
print &#8220;Size&#8221;;</p>
<p>// can you make unserialize code for me, plizzz. I want 2 display the data in table<br />
// i tried, but the result is terrible</p>
<p>while ($row=mysql_fetch_row($doQuery))<br />
{<br />
 print &#8220;$row[0]&#8220;;<br />
 print &#8220;$row[1]&#8220;;<br />
 print&#8221;$row[2]&#8220;;<br />
 print &#8220;$row[3]&#8220;;<br />
}<br />
print &#8220;&#8221;;<br />
?&gt;<br />
==end script<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bobby dee</title>
		<link>http://www.tanzilo.com/2008/12/31/php-serialization-unserialization-explanation-code-example/comment-page-1/#comment-491</link>
		<dc:creator>bobby dee</dc:creator>
		<pubDate>Sat, 14 Feb 2009 01:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.tanzilo.com/?p=62#comment-491</guid>
		<description>Now the confusion is dead, thank you for being a serialized confusion killer :)!</description>
		<content:encoded><![CDATA[<p>Now the confusion is dead, thank you for being a serialized confusion killer <img src='http://www.tanzilo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> !</p>
]]></content:encoded>
	</item>
</channel>
</rss>
