join()函数:把数组元素组合为一个字符串。
<?php
$number = range(0,5);
print_r ($number);
?>
举例:
结果:Hello World! I love Shanghai!
range():range() 函数创建一个包含指定范围的元素的数组。举例:
<?php
$arr = array('Hello','World!','I','love','Shanghai!');
echo join(" ",$arr);
?>
结果:Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
substr():substr() 函数返回字符串的一部分。举例:
<?php
echo substr("Hello world",6);
?>
结果:world
str_shuffle() :函数随机地打乱字符串中的所有字符。
语法 :str_shuffle(string)
strtoupper() 函数把字符串转换为大写。语法 :strtoupper(string)
imagecreatetruecolor()
功能与 imagecreate()
类似,创建一幅真彩色的图像,从而支持更为丰富的色彩。imagecreatetruecolor( int x, int y )
imagefill() 函数用于图像区域填充。语法 : bool imagefill( resource image, int x, int y, int color )
imagecolorallocate — 为一幅图像分配颜色。语法 : int imagecolorallocate ( resource $image , int $red , int $green , int $blue )
mt_rand() 使用 Mersenne Twister 算法返回随机整数。语法 :mt_rand(min,max)
ceil() 函数向上舍入为最接近的整数。语法 :ceil(x)
imagechar() — 写出横向的字符。语法 :bool imagechar ( resource $image , int $font , int $x , int $y , string $c , int $color )
bool imagesetpixel(resource $image,int $x,int $y,int $color) //画一个单一像素
bool imageline(resource $image,int $x1,int $y1,int $x2,int $y2,int $color) //画一条线段