Category Archives: php

date() error in php 5.3

ShareAfter reinstalling my local machine and updating the php version to 5.3 I’m getting this error: Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the … Continue reading

More Galleries | Leave a comment

array_diff_key

Share(PHP 5 >= 5.1.0RC1) array_diff_key – Computes the difference of arrays using keys for comparison Description array array_diff_key ( array array1, array array2 [, array ...] ) array_diff_key() returns an array containing all the values of array1 that have keys that are … Continue reading

Posted in php | Tagged , , | Leave a comment

string to constant

Shareconstant (PHP 4 >= 4.0.4, PHP 5) constant – Returns the value of a constant Description mixed constant ( string name )constant() will return the value of the constant indicated by name. constant() is useful if you need to retrieve … Continue reading

Posted in php | Tagged , | Leave a comment

php string functions

Share Name Description ASCII() Return numeric value of left-most character BIN() Return a string representation of the argument BIT_LENGTH() Return length of argument in bits CHAR_LENGTH() Return number of characters in argument CHAR() Return the character for each integer passed … Continue reading

Posted in php | Tagged , , , , | Leave a comment

preg_match case insensitive

Share preg_match case insensitive <?php // The ”i” after the pattern delimiter indicates a case-insensitive search if (preg_match(“/php/i”, ”PHP is the web scripting language of choice.”)) {     echo ”A match was found.”; } else {     echo ”A match was not found.”; } ?>

Posted in php, regex | Tagged , , , | Leave a comment