Re: [請益] function的回傳值遇上問題
會不會跟PHP官網上關於print_r的說明有關?
(略)
Remember that print_r() will move the array pointer to the end. Use reset()
to bring it back to beginning.
(略)
所以你在函式內print_r array變數 後, 應該要reset, 然後再回傳.
※ 引述《Peruheru (還在想)》之銘言:
: 是這樣的
(略)
: 原來程式碼是
: $results = funA(....); (中間省略不打,有好幾個參數)
: print_r($results);
: echo '.<br />';
: '---[2]---'的下面第一行是function內的print_r
: 'get : '後的則是收到回傳值以後印的print_r
: 所以第一次會看到'get : '後面接著回傳結果,然後是小數點'.'之後換行
: 第二次'get : '後面卻直接接上 '.'
: 所以我也不知道這算是什麼東西
: ※好像也只能提供函式了 http://radiantgarden.myweb.hinet.net/tFunc.zip
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 58.115.151.184
※ 編輯: bobju 來自: 58.115.151.184 (10/19 22:29)
推
10/19 22:30, , 1F
10/19 22:30, 1F
→
10/19 22:30, , 2F
10/19 22:30, 2F
→
10/19 22:34, , 3F
10/19 22:34, 3F
→
10/19 22:36, , 4F
10/19 22:36, 4F
→
10/19 22:37, , 5F
10/19 22:37, 5F
→
10/19 22:37, , 6F
10/19 22:37, 6F
→
10/19 22:39, , 7F
10/19 22:39, 7F
推
10/19 22:40, , 8F
10/19 22:40, 8F
→
10/19 22:40, , 9F
10/19 22:40, 9F
→
10/19 22:41, , 10F
10/19 22:41, 10F
→
10/19 22:41, , 11F
10/19 22:41, 11F
→
10/19 22:42, , 12F
10/19 22:42, 12F
→
10/19 22:43, , 13F
10/19 22:43, 13F
→
10/19 22:44, , 14F
10/19 22:44, 14F
→
10/19 22:44, , 15F
10/19 22:44, 15F
推
10/19 22:47, , 16F
10/19 22:47, 16F
→
10/19 22:48, , 17F
10/19 22:48, 17F
→
10/19 22:49, , 18F
10/19 22:49, 18F
→
10/19 22:59, , 19F
10/19 22:59, 19F
→
10/19 23:00, , 20F
10/19 23:00, 20F
→
10/19 23:00, , 21F
10/19 23:00, 21F
→
10/19 23:01, , 22F
10/19 23:01, 22F
推
10/19 23:02, , 23F
10/19 23:02, 23F
→
10/19 23:02, , 24F
10/19 23:02, 24F
推
10/19 23:06, , 25F
10/19 23:06, 25F
→
10/19 23:07, , 26F
10/19 23:07, 26F
推
10/19 23:08, , 27F
10/19 23:08, 27F
→
10/19 23:09, , 28F
10/19 23:09, 28F
→
10/19 23:17, , 29F
10/19 23:17, 29F
→
10/19 23:18, , 30F
10/19 23:18, 30F
→
10/19 23:19, , 31F
10/19 23:19, 31F
推
10/19 23:21, , 32F
10/19 23:21, 32F
→
10/19 23:23, , 33F
10/19 23:23, 33F
→
10/19 23:23, , 34F
10/19 23:23, 34F
→
10/19 23:27, , 35F
10/19 23:27, 35F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 4 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章