Author Archives: dathoang

PHP Array Functions

Function Example OR Syntax array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_key array_diff_assoc array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_keys array_key_exists array_map array_merge array_multisort array_pop array_push array_rand array_replace array_reverse array_search array_shift array_slice array_splice array_sum array_unique array_unshift array_values current, next, prev, end end sort in_array

PHP FILTER VALIDATION

Filter The Special Characters Validate Integer: FILTER_VALIDATE_INT Validate Integer With Range: FILTER_VALIDATE_INT Validate Email: FILTER_VALIDATE_EMAIL Validate Email With _GET Method: FILTER_VALIDATE_EMAIL Validate Integer With _POST Method: FILTER_VALIDATE_INT   Filter The Special Characters <?php $String=”asdf-32^3###3sa435r”; $String=preg_replace(‘/[^a-zA-Z0-9_ -]/s’, ”, $String); echo $String; /** output **/ asdf-3233sa435r ?> Validate Integer: FILTER_VALIDATE_INT <?php $int = “123”; if(!filter_var($int, FILTER_VALIDATE_INT)) { […]

PHP Variable

What is Variable? Rules For Variable Variable Types Constant Predefined Variables What is Variable? PHP6 introduce 64bit integer A variable is a representation of particular value. Simplay we can call this “containers” for storing information. By assinging a value to variable, you can reference the variable in other places in your script and we can […]

PHP String count_chars

Syntax:mixed count_chars ( string $string [, int $mode = 0 ] ) Description:count_chars — Return information about characters used in a string.Counts the number of occurrences of every byte-value (0..255) in string and returns it in various ways. Return Values: 0 – an array with the byte-value as key and the frequency of every byte as value. 1 […]

PHP Sort

Syntax: bool sort ( array &$array [, int $sort_flags = SORT_REGULAR ] ) Description: Sort an array <?php $fruits = array(“lemon”, “orange”, “banana”, “apple”); sort($fruits); print_r($fruits); ?> OUTPUT Array ( [0] => apple [1] => banana [2] => lemon [3] => orange )  

PHP Variables And Constant

What is Variable? Rules For Variable Variable Types Constant Predefined Variables What is Variable? PHP6 introduce 64bit integer A variable is a representation of particular value. Simplay we can call this “containers” for storing information. By assinging a value to variable, you can reference the variable in other places in your script and we can change […]

Best Premium Classifieds Directory WordPress Themes

Best Premium WordPress Directory Classifieds Themes are listed below. Try your best one. 1. FlatAds – Classified AdsWordPress Theme The FlatAds is a Premium Directory/Listing WordPress theme, super flexible and has a fully responsive design (try resizing your browser). Built with HTML5 and CSS3 . A lot of thought and care were put into FlatAds making […]