Created
September 24, 2011 13:05
-
-
Save gjnoonan/1239307 to your computer and use it in GitHub Desktop.
This file contains 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
running PHP 5.3.6 with (/usr/bin/php) >>> | |
Array | |
( | |
[Format] => DVD Video Disc - DVD / Normal | |
[OriginalLanguage] => Swedish | |
) | |
Format: DVD Video Disc - DVD / Normal |
This file contains 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 | |
$headings = array('Format', 'Original language'); | |
$results = array('DVD Video Disc - DVD / Normal', 'Swedish'); | |
function sanitise($string){ return str_replace(" ", "", ucwords($string)); } | |
$clean_headings = array_map("sanitise", $headings); | |
$combined_results = | |
array_combine($clean_headings, $results); | |
print_r($combined_results); | |
print "Format: ".$combined_results['Format']; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment