xiaozi 2015-05-10 15:22:44

php中,建立数字字符串为key的数组

<?php

$arr = new StdClass();
$key = 1;
$arr->$key = 'hehe';

var_dump(['1' => 'haha']);
var_dump($arr);

评论

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.130.1. UTC+08:00, 2024-07-23 22:49
浙ICP备14020137号-1 $访客地图$