array-push

    0熱度

    3回答

    我已經使用了Google和這個網站的各種方法,但不知何故我的問題沒有得到解決。 這是我的問題:我有一個名爲$color的數組,我想從一個函數內向這個(多維)數組添加數組。 $color = array(); function hex2RGB($hex){ $hex = ltrim($hex,'#'); $a = hexdec(substr($hex,0,2));

    1熱度

    1回答

    我有一個控制器,我想在其中設置一個日誌,其中特定用戶可以看到任務的歷史記錄(看起來像({用戶}將任務設置爲{任務狀態}),他是否接受。任務或沒有我想設置這個「地位」的陣列裏,所以當我讓它顯示出來,它看起來像事件的列表 到目前爲止,這裏是它的外觀: /** * @Route("/accept/{id}", name="mission_accept") * @Method("POST") */

    0熱度

    2回答

    我試圖從我的LAMP服務器獲取產品數據。但我沒有得到迴應。問題似乎是array_push不能正常工作,因爲我可以在使用echo之前打印數據。 我對PHP相當陌生。 感謝您的提前幫助。 <?php ini_set('display_errors', 'On'); error_reporting(E_ALL); $servername = "localhost"; $username = "

    0熱度

    3回答

    $url = file_get_contents("http://api.themoviedb.org/3/movie/000008?append_to_response=credits,images&api_key=###"); $json = json_decode($url, true) $inp = file_get_contents('test3.json'); $tempArr

    0熱度

    1回答

    想法是,當您單擊Volgende時,將$ getal1,$ getal1,$ soort和$ antwoord放入數組中。如果這是第二次,那就是第一次和第二次。 這是我在英語 PHP代碼 <?php $kind = $_SESSION['kind'];//get the kind of task choose from +-/* $class = $_SESSION['class'];//ge

    0熱度

    1回答

    我拉從Adobe Analytics(分析)的報告,我試圖將結果保存在一個CSV文件CSV文件。這裏是我的代碼的描述: <?php include_once('/path/SimpleRestClient.php'); // Creation of csv filepath $adobe_file = $sql_path = '/path/adobe.csv'; // List cre

    -2熱度

    1回答

    我有一個數組,其中只包含一次header.php文件。 的header.php: <? session_start(); include_once("array.php"); ?> array.php: <?$foo["cart"] = array();?> 在order.php我具有被提交表單時執行的陣列和代碼。在array_push之後,您將被重定向到webshop.php,您可

    0熱度

    1回答

    我想解決這個分支樹搜索,我想收集1個變量數組中的分支的所有值,並且問題是,分支函數返回當有很多值時,只有2個值,實際上我使用的是Codeigniter。 這是我的父功能: $data['left'] = array(); $data['right'] = array(); $c=array(); foreach ($root as $r){ if ($r-

    3熱度

    2回答

    我創建它返回一個JSON文件,HTML文件,我填補了從data.php文件中的數據網格中data.php文件。 我需要這是在以下形式的關聯數組: [ {"CompanyName":"Alfreds Futterkiste","ContactName":"Maria Anders","ContactTitle":"Sales Representative"}, {"CompanyName":"A

    -1熱度

    1回答

    有人可以幫助我如何array_push多維數組。 這是我推動的代碼。 $arrDataChart3["categories"] = array(); array_push($arrDataChart3["categories"], array( "category"=>array() ) ); while($row = s