<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.2" -->
<rss version="0.92">
<channel>
	<title>PHPedia</title>
	<link>http://php.bubble.ro</link>
	<description>The solution for all your PHP problems ... almost.</description>
	<lastBuildDate>Thu, 18 Feb 2010 16:03:26 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>How to call a custom method from a class</title>
		<description><![CDATA[There are some cases when you don&#8217;t know the name of a function you need to call, or that name can depend from various cases. This is why you need to call a static method by using a custom parameter. This is how you do it:
class Class1
{
 public static function a($x)
{
 echo 'in function a: [...]]]></description>
		<link>http://php.bubble.ro/php-tips/how-to-call-a-custom-method-from-a-class/</link>
			</item>
	<item>
		<title>Convert numbers to words</title>
		<description><![CDATA[Numbers are great, sure, but sometimes you need to spell them out &#8230; and if you think the possibility for that to happen is slim, invoices and checks for example need to have the ammount in both numbers and letters (in most countries).
That&#8217;s why a script to convert numbers to words (to spell numbers) can [...]]]></description>
		<link>http://php.bubble.ro/php-scripts/convert-numbers-to-words/</link>
			</item>
	<item>
		<title>Top 5 PHP replacements for Apache default directory listing</title>
		<description><![CDATA[You all know the default Apache directory listing .. and I bet most of you hate it. It does the job, sure, but it&#8217;s not exactly the most useful (or the best looking).

This is why you might want to use a more professional script if you want to show some files/directories.
1. phpFe &#8211; PHP File [...]]]></description>
		<link>http://php.bubble.ro/php-scripts/top-5-php-replacements-for-apache-default-directory-listing/</link>
			</item>
	<item>
		<title>PHP Warning:  Cannot modify header information &#8211; headers already sent</title>
		<description><![CDATA[Message:
PHP Warning: Cannot modify header information - headers already sent by (output started at /home/w.php:189) in /home/start.php on line 64
Error type: warning
Symptoms:
You try to send a header value from PHP (for example a redirect) and it fails with this warning.
Sample Code:
&#60;?php
echo &#8216;Redirecting: &#8216;;
header(&#8216;Location: /&#8217;);
exit;
?&#62;
Cause:
You must send headers before you output anything on that page. This [...]]]></description>
		<link>http://php.bubble.ro/php-warnings/php-warning-cannot-modify-header-information-headers-already-sent/</link>
			</item>
	<item>
		<title>PHP Warning: fsockopen(): unable to connect (Connection timed out)</title>
		<description><![CDATA[Message:
PHP Warning:fsockopen(): unable to connect to rpc.technorati.com:80 (Connection timed out) in /home/public_html/pinger.php on line 66
Error type: warning
Symptoms:
You try to open a socket to a remote location, but your connection is timed out (you don&#8217;t receive any response).
Sample Code:
&#60;?php
$fs = fsockopen($ping_host, $ping_port, $errno, $errstr);
if (is_resource($fs))
{
stream_set_write_buffer($fs,0);
fwrite($fs, $http_request);
while (!feof($fs))
{
$response .= fgets($fs, 2048);
}
fclose($fs);
}
?&#62;
Cause:
The host you are trying to connect [...]]]></description>
		<link>http://php.bubble.ro/php-warnings/php-warning-fsockopen-unable-to-connect-connection-timed-out/</link>
			</item>
	<item>
		<title>PHP Warning:  Variable passed to each() is not an array or object</title>
		<description><![CDATA[Message:
PHP Warning: Variable passed to each() is not an array or object in /home/functions.php on line 23
Error type: warning
Symptoms:
You try to use each, but instead of going through the loop, you just receive a warning.
Sample Code:
&#60;?php
while (list($key, $val) = each ($myvar))
{
echo $key.&#8217; &#8216;;
}
?&#62;
Cause:
You try to use the each() function with a null, integer or string [...]]]></description>
		<link>http://php.bubble.ro/php-warnings/php-warning-variable-passed-to-each-is-not-an-array-or-object/</link>
			</item>
	<item>
		<title>PHP Warning: reset(): Passed variable is not an array or object</title>
		<description><![CDATA[Message:
PHP Warning: reset(): Passed variable is not an array or object in /home/cron.php on line 43
Error type: warning
Symptoms:
You get a reset() warning although the code seems to work fine.
Sample Code:
&#60;?php
$string = &#8220;This is a string.&#8221;;
reset($string);
?&#62;
Cause:
You try to use the reset() function with a null, an integer or a string (these are most common), when you [...]]]></description>
		<link>http://php.bubble.ro/php-warnings/php-warning-reset-passed-variable-is-not-an-array-or-object/</link>
			</item>
	<item>
		<title>Fatal error: Allowed memory size of * bytes exhausted</title>
		<description><![CDATA[Message:
Fatal error: Allowed memory size of 867300 bytes exhausted (tried to allocate 1280200 bytes) in /home/public_html/index.php on line 135
Error type: fatal error
Symptoms:
Page parsing fails and you receive the message in the output. Usually associated with GD (image manipulation) functions or when you deal with large arrays.
Cause:
You do not have enough memory (RAM) available to run [...]]]></description>
		<link>http://php.bubble.ro/php-errors/fatal-error-allowed-memory-size-of-bytes-exhausted/</link>
			</item>
	<item>
		<title>Fatal error: Call to undefined function myfunction()</title>
		<description><![CDATA[Message:
Fatal error: Call to undefined function myfunction() in /www/myproject/index.php on line 1345
Error type: fatal error
Symptoms:
Page parsing fails and you receive that message in the output. If display_errors is set to Off in php.ini you will need to check error logs for the message.
Sample Code:
&#60;?php
$id = $_GET['id'];
myfunction($id);
?&#62;
Cause:
You are attempting to call a function which does not [...]]]></description>
		<link>http://php.bubble.ro/php-errors/fatal-error-call-to-undefined-function-myfunction/</link>
			</item>
	<item>
		<title>Welcome to PHPedia</title>
		<description><![CDATA[Hello there!
If you&#8217;re wondering what this website is about, here&#8217;s your answer: a website where you can find the solution for any PHP problem you might encounter: PHP syntax errors, PHP unexpected results or other stuff that might hold you back from developing that awesome script you were working on.
Want to give me a hand?
If [...]]]></description>
		<link>http://php.bubble.ro/uncategorized/welcome-phpedia/</link>
			</item>
</channel>
</rss>
