Flash初哥

January 11, 2010

Protected: DisscussKiller v1.2

Filed under: DiscussKiller — Tags: , — KAV @ 9:19 am

This post is password protected. To view it please enter your password below:


Perl、PHP、ASP、JSP技术比较

Filed under: Java技術文章,PHP,網上收隼 — Tags: , , , — KAV @ 8:19 am

本文将对目前最常用的四种动态网页语言Perl(Practical Extraction and Report Language)、PHP(Hypertext Preprocessor)、ASP(Active Server Pages)、JSP(JavaServer Pages)进行一些技术性的比较。

(more…)

PHP Array

Filed under: PHP — Tags: — KAV @ 8:12 am

Numeric Arrays

A numeric array stores each array element with a numeric index.

There are two methods to create a numeric array.

(more…)

PHP数组入门教程 (PHP Array)

Filed under: PHP — Tags: — KAV @ 8:10 am

我不知道PHP

初学者是怎么学习 函数的,但是我认为学习他一定是有目的性,它是目的驱动的,以数组函数为例!这么多的数组函数我们该怎么学习?其实我们只需要清楚,我们需要对数组做哪些操 作,然后把这些操作归类,心中就有了大概的印象,然后随着你的实践,这些函数你就很清楚了,在这里提醒大家的是手册要常备!废话不多说,数组函数一般归为 以下几类(看到英文别怕哦):
(more…)

PHP 隨機數 random mt_rand()

Filed under: PHP,原創 — Tags: — KAV @ 7:39 am

PHP mt_rand() Function


Complete PHP Math Reference


Definition and Usage

The mt_rand() function returns a random integer using the Mersenne Twister algorithm.

If this function is called without parameters, it returns a pseudo-random value between 0 and RAND_MAX.

If you want a random number between 10 and 100 (inclusive), use mt_rand (10,100).

Syntax

mt_rand(min,max)
Parameter Description
min,max Optional. Specifies the range the random number should lie within

Tips and Notes

Tip: This function produces a better random value four times faster than rand()!

Note: In PHP 4.2.0 and later, there is no need to seed the random generator with mt_srand(). This is done automatically.


Example

In this example we will return some random numbers:

<?php
echo(mt_rand() . “<br />”);
echo(mt_rand() . “<br />”);
echo(mt_rand(10,100))
?>

The output of the code above could be:

1150905288
613289478
21

Powered by WordPress