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
$oldFormat = array( | |
'male' => 'Male', | |
'female' => 'Female' | |
); | |
$newFormat = array_map(function($value, $label) { | |
return array( | |
'label' => $label, | |
'value' => $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
function implode_filter($glue , $pieces) { | |
return implode($glue, array_filter($pieces)); | |
} |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<project name="Awesome Application" default="update"> | |
<target name="update" description=""> | |
<property name="username" value="" /> | |
<property name="hostname" value="" /> | |
<property name="public_path" value="/srv/www/your-app/public_html" /> | |
<exec outputProperty="result" | |
command="ssh ${username}@${hostname} 'cd ${public_path}; git pull;'" /> |
NewerOlder