This article will give information about php “encryption” and “decryption”. When we send information from one page to another page via “URL”, Anyone can see what we are sending in url. To avoid that, We will send encrypted message or information. On destination page we will decrypt this text. So it will secure and anyone […]
Category Archives: PHP
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)) { […]
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 […]
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 […]
Syntax:void echo ( string $arg1 [, string $… ] ) Description:echo — Output one or more strings Return Values No value is returned. Example 1 <?php echo “Hello World”; echo “<br/>Hello<br/> World”; ?> OUTPUT Hello World Hello World
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 )
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 […]