作者:王炜
日期:2014年05月05日
1,将字符串中的每个单词首字母大写
function getString($eString)
{
$eString = explode('_',$eString);
$eString = array_map("ucfirst",$eString);
$eString = implode($eString,'_');
return $eString;
}
echo getString("make_by_id");
<?php
{
$str = "<tr>
<td>$a</td>
<td>$b</td>
</tr>";
return $str;
}
$x = array_map("show",$a,$b);
echo "<table width="770" border="1" cellspacing="0" cellpadding="0">";
for($i=0;$i<count($x);$i++)
{
echo $x[$i];
}
echo "</table>";
$a = array(1, 2, 3, 4, 5);
$b = array("one", "two", "three", "four", "five");
$c = array("uno", "dos", "tres", "cuatro", "cinco");
$d = array_map(null, $a, $b, $c);
print_r($d);
?>
欢迎转载,转载请保留链接: https://www.phpzu.com/article/2014/05/05/330.html