This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $objPHPExcel->getActiveSheet()->getHeaderFooter() | |
| ->setOddHeader('&C&H&25INTERVIEW WORKSHEET'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array_count_values | |
| //---------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| function array_icount_values($array) { | |
| $ret_array = array(); | |
| foreach($array as $value) { | |
| foreach($ret_array as $key2 => $value2) { | |
| if(strtolower($key2) == strtolower($value)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $input = array("a" => "green", "red", "b" => "green", "blue", "red"); | |
| $result = array_unique($input); | |
| print_r($result); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I USE: array_shift(array_values($array)); | |
| Original answer, but costly (O(n)): | |
| array_shift(array_values($array)); | |
| In O(1): | |
| array_pop(array_reverse($array)); | |
| Edited with suggestions from comments for other use cases etc... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $os = array("Mac", "NT", "Irix", "Linux"); | |
| if (in_array("Irix", $os)) { | |
| echo "Got Irix"; | |
| } | |
| if (in_array("mac", $os)) { | |
| echo "Got mac"; | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="panel panel-flat panel-collapsed"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CONVERT(VARCHAR(10),RECORDS_ACTIONS.DTE ,101) As ActionDate, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $customList = trim($customList); | |
| $customList = str_replace(' ', '', $customList); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $a = 'How are you?'; | |
| if (strpos($a, 'are') !== false) { | |
| echo 'true'; | |
| } |
NewerOlder