<?php
function printLove($input = "*")
{
$love = array(0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 4, 5, 2, 3, 4, 1, 0, 1,0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$str = '';
for($i = 0; $i < count($love); $i++){
if($i % 7 == 0) $str .= "\n";
if($love[$i] == 0) $str .= " ";
else if($love[$i] == 1) $str .= " ";
else if($love[$i] == 5) $str .= " I";
else if($love[$i] == 2) $str .= " LOVE";
else if($love[$i] == 3) $str .= " YOU";
else $str .= " ".$input;
}
echo $str;
}
printLove();
添加回答
举报
0/150
提交
取消