<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Costinu's Blog &#187; JS</title>
	<atom:link href="http://blog.costinu.com/category/scripturi/js/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.costinu.com</link>
	<description></description>
	<lastBuildDate>Fri, 26 Mar 2010 06:47:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Implementarea functiei PHP serialize() in JavaScript</title>
		<link>http://blog.costinu.com/2007/10/05/implementation-of-phps-serialize-function-in-javascript/</link>
		<comments>http://blog.costinu.com/2007/10/05/implementation-of-phps-serialize-function-in-javascript/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 14:53:33 +0000</pubDate>
		<dc:creator>costinu</dc:creator>
				<category><![CDATA[JS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[serialize]]></category>

		<guid isPermaLink="false">http://blog.costinu.com/archives/29</guid>
		<description><![CDATA[PLAIN TEXT
JavaScript:




/**


*function implementing PHP's serialize() function


*@param: v - elements to be serialized


*@return: serialized string


*/


function serialize&#40;v&#41;&#123;


if&#40;typeof&#40;v&#41;=='object' &#38;amp;&#38;amp; v.constructor==Array&#41;&#123;


var i,s='',c=0;


for&#40;i in v&#41;&#123;


++c;


s+=serialize&#40;i&#41;+serialize&#40;v&#91;i&#93;&#41;;


&#125;


s="a:"+c+":{"+s+"}";


return s;


&#125; else &#123;


if&#40;Number&#40;v&#41;==v&#41;&#123;


return 'i:'+v+';';


&#125; else


if&#40;typeof&#40;v&#41;=='string'&#41;&#123;


return 's:'+v.length+':&#34;'+v+'&#34;;';


&#125;


&#125;


&#125; 






&#169;2010 Costinu's Blog. All Rights Reserved..]]></description>
		<wfw:commentRss>http://blog.costinu.com/2007/10/05/implementation-of-phps-serialize-function-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementarea functiei PHP print_r() in JavaScript</title>
		<link>http://blog.costinu.com/2007/10/05/implementation-of-phps-print_r-in-javascript/</link>
		<comments>http://blog.costinu.com/2007/10/05/implementation-of-phps-print_r-in-javascript/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 14:49:58 +0000</pubDate>
		<dc:creator>costinu</dc:creator>
				<category><![CDATA[JS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[print_r]]></category>

		<guid isPermaLink="false">http://blog.costinu.com/archives/28</guid>
		<description><![CDATA[PLAIN TEXT
JavaScript:




/**


*function : print_r()


*@param: array-array,hass or object


*@param: level - OPTIONAL


*@returns: string - The textual representation of the array.


*/


function print_r&#40;array,level&#41; &#123;


var dumped_text = "";


if&#40;!level&#41; level = 0;


//The padding given at the beginning of the line.


var level_padding = "&#160; &#160;";


for&#40;var j=0;j&#38;lt;level;j++&#41; level_padding += "&#160; &#160; ";


if&#40;typeof&#40;array&#41; == 'object'&#41; &#123; //Array/Hashes/Objects


var obj = 0;


for&#40;var item in array&#41; &#123;


var [...]]]></description>
		<wfw:commentRss>http://blog.costinu.com/2007/10/05/implementation-of-phps-print_r-in-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implementarea functiei PHP in_array() in JavaScript</title>
		<link>http://blog.costinu.com/2007/10/05/implementation-of-in_array-function-for-javascript/</link>
		<comments>http://blog.costinu.com/2007/10/05/implementation-of-in_array-function-for-javascript/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 13:38:13 +0000</pubDate>
		<dc:creator>costinu</dc:creator>
				<category><![CDATA[JS]]></category>
		<category><![CDATA[in_array]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.costinu.com/archives/27</guid>
		<description><![CDATA[PLAIN TEXT
JavaScript:




/**


*functin implementing PHP's in_array() function


*@param: array - search array


*@param: search_term - element to be searched


*@return: true/false


*/


function in_array &#40;array, search_term&#41; &#123;


if &#40;array&#41; &#123; //see if array exists


var i = array.length;


if &#40;i&#38;gt; 0&#41; &#123;


do &#123;


if &#40;array&#91;i&#93; === search_term&#41; &#123;


return true;


&#125;


&#125; while &#40;i--&#41;;


&#125;


return false;


&#125; else &#123;


return false;


&#125;


&#125; 






&#169;2010 Costinu's Blog. All Rights Reserved..]]></description>
		<wfw:commentRss>http://blog.costinu.com/2007/10/05/implementation-of-in_array-function-for-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
