<p class="services_dropbox">
                        <input type="checkbox" class="checkbox" id="services_dropbox" name="services_dropbox" value="Dropbox" />
                        <label for="services_dropbox">Dropbox</label>
                        <span class="extra">&hellip;
                            <input type="checkbox" class="checkbox" id="services_dropbox_paid" name="services_dropbox_paid" value="dropbox_paid" />
                            <label for="services_dropbox_paid">And I pay for extra space</label> 
                        </span>
                    </p>
                    <?php 
$options = array('Heroku', 'Amazon S3', 'Amazon EC2', 'Google App Engine', 'Basecamp or Highrise');
shuffle($options);
for ($i = 0; $i < sizeof($options); $i++) {
    echo '
                    <p class="services_' . asciify($options[$i]) . '">
                        <input type="checkbox" class="checkbox" id="services_' . asciify($options[$i]) . '" name="services_' . asciify($options[$i]) . '" value="' . $options[$i] . '" />
                        <label for="services_' . asciify($options[$i]) . '">' . $options[$i] . '</label>
                    </p>';
}
?>
                </div>
                
                <div class="versioncontrol">
                    <label><b><?php 
echo $n;
$n++;
?>
</b> Do you use..?</label>
                    <?php 
$options = array('git' => 'Git', 'hg' => 'Mercurial (Hg)', 'svn' => 'Subversion (SVN)');
foreach ($options as $k => $v) {
    echo '
예제 #2
0
파일: php.php 프로젝트: ox-it/asciification
<?php

// Requires php-intl
$special_cases = array("æ" => "ae", "Æ" => "AE", "œ" => "oe", "Œ" => "OE", "þ" => "th", "Þ" => "TH", "ä" => "ae", "Ä" => "AE", "ö" => "oe", "Ö" => "OE", "ü" => "ue", "Ü" => "UE", "ß" => "ss");
$special_cases_keys = array_keys($special_cases);
function asciify($text)
{
    global $special_cases, $special_cases_keys;
    $text = Normalizer::normalize($text, Normalizer::FORM_C);
    $text = str_replace($special_cases_keys, $special_cases, $text);
    $text = Normalizer::normalize($text, Normalizer::FORM_D);
    return preg_replace('/[^\\x20-\\x7E]/', '', $text);
}
echo asciify("héllöþ");