▼  Site Navigation Main Articles News Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc Links to Webcomics Bible Quotes About Older Musings
site version 7.3
PHP –– Capitalize all of the letters in an array
written by: admin


Date Written: 7/19/08 Last Updated: 1/15/10

This will capitalize all of the letters and words in an array
<?php $terms=array(ae,be,ce,de,ee,fe,ge,he,ie,je,ke,le,me,ne,oe,pe,qe,re,
se,te,ue,ve,we,xe,ye,ze);
foreach ($terms as $terms1=>$value){
$term[]=strtoupper($value);
}$terms=$term;print_r($terms);
?>

I don't know why I wrote this snippet.  Why would I want to do this?

I know.  The above is simply a handy reference for a script that will loop through an array and make changes to all of the data in the array.

TAGS: php
copyright 2005–2024