PHP is a neat little web development language - http://www.php.net. Also see Pear, Symfony and Drupal.
- Downloading HTTP Basic-Authenticated Pages with PHP and CURL
- Uploading via POST with PHP and CURL
- Comparing Two SimpleXML Documents
- Installing PHP 5.2 on CentOS
- PDT vs PHPEclipse vs PhpStorm
- Composer
- Other pages tagged as "php"
return (isset($this->values[$name]) && $this->values[$name]) ? $this->values[$name] : ($default ? $default : (isset($this->fields[$name]["default"]) ? $this->fields[$name]["default"] : (isset($this->fields[$name]["type"]) && $this->fields[$name]["type"] == "checkbox" ? ($this->fields[$name]["checked"] ? $this->fields[$name]["value"] : false) : (isset($this->fields[$name]["value"]) ? $this->fields[$name]["value"] : ""))));
See if you can spot the bug

php_mcrypt.dll
If you get an error with PHP on IIS/Windows saying "The specified module could not be found" when you enable extension=php_mcrypt.dll in php.ini, the solution is to download the libmcrypt.dll file from http://ftp.emini.dk/pub/php/win32/mcrypt/ and place this in your Windows System32 directory. (No, the PHP extensions directory won't work.)
How to turn off magicquotesgpc
This option can't be changed with ini_set. With Apache, you can turn this option off in .htaccess by:
php_flag magic_quotes_gpc off
Simple Template Matching
function template_compile($template, $data) { $out = $template; foreach ($data as $key => $value) { $out = str_replace("{" . $key . "}", $value, $out); } return $out; }
PHPSESSID is not working
In PHP 5.3.0, they changed the default setting for "session.useonlycookies" from "true" to "false". This means that passing the session ID in the URL will no longer work. This can be set with ini_set:ini_set("session.use_only_cookies", false);