Posts Tagged ‘output’

What is PHP?

Thursday, July 24th, 2008

PHP is a scripting language that is often imbedded into HTML to add functions HTML alone can’t do. PHP allows you to collect, process and utilize data to create a desired output. In short, it let’s you interact with your pages.

PHP is able to preform a number of tasks including printing data, making numeric calculations (such as addition or multiplication), making comparisons (which is bigger, are they equal, etc) and making simple boolean choices. From this you can create more complex loops and functions to make your page generate more specialized data.

PHP:Enable Output Compression

Monday, June 30th, 2008

Paste following code as the beggining in your config file in order compression to be applied to all files.
<?php
ob_start( ‘ob_gzhandler’ );
?>

PHP:array change key case

Monday, June 30th, 2008

<?php
$input_array = array(”FirSt” => 1, “SecOnd” => 4);
print_r(array_change_key_case($input_array, CASE_UPPER));
?>
The above example will output:
copy to clipboard
Array
(
[FIRST] => 1
[SECOND] => 4
)