Problem
How to extract values from Arrays
Solution
For example, select count (*)... the result should have only one value. Now there is only one value in an array. How can we obtain it?
Prerequisites: you do not know the array key name and cannot use a digital index.
Reference answer
Array_values
Reference answer
Take a look at the usage of mysql_result () in the manual. It is more convenient to use a single value.
Reference answer
The original Post published by xdedevil at [url = http://bbs.111cn.cn/redirect.php? Goto = findpost & pid = 812883 & ptid = 100203] link mark [img] http://bbs.111cn.cn/images/common/back.gif?/img=#/url]
Array_values
The returned value of this function is array, and the value is not directly obtained.
Reference answer
I don't know what to say ,,
Reference answer
Mysql_fetch_row ()//
$ Arr [0];
?>
Do not forget: mysql_fetch_row usage ..
Reference answer
Current
(PHP 3, PHP 4, PHP 5)
Current -- returns the current unit in the array.
Description
Mixed current (array & array)
Reference answer
Original Post published by Yu An on [url = http://bbs.111cn.cn/redirect.php? Goto = findpost & pid = 812910 & ptid = 100203] link mark [img] http://bbs.111cn.cn/images/common/back.gif?/img=#/url]
Do not forget: mysql_fetch_row usage ..
Unfortunately, mysql is useless.
Reference answer
The original Post published by ddm at [url = http://bbs.111cn.cn/redirect.php? Goto = findpost & pid = 812916 & ptid = 100203] link mark [img] http://bbs.111cn.cn/images/common/back.gif?/img=#/url]
Current
(PHP 3, PHP 4, PHP 5)
Current -- returns the current unit in the array.
Description
Mixed current (array & array)
Thank you very much for asking for this baby [img] http://www.111cn.cn/bbs/images/smilies/default/loveliness.gif#/img]
Reference answer
There are many methods, such:
Array_shift
Array_pop
This function can all implement the functions you need.