我一直在努力简单地显示当前时间,无法在任何地方找到解决方案......对于错位的帖子感到抱歉.
我想要的只是在用户的电脑或手机上显示时间.
我能做的就是让时间显示在一个盒子里,而不是让它每秒都显示和更新.
这是我目前的代码
//store the current time
t=date_current_datetime();
//get the hour portion of that time
h=date_get_hour(t);
//get the minute portion of the time.
m=date_get_minute(t);
//get the second potion of the time
s=date_get_second(t);
//show the time
txt="The current time is:"+string(h)+":"+string(m)+":"+string(s);
show_message(txt);
Run Code Online (Sandbox Code Playgroud)
希望这个游戏制作者代码有意义,感谢任何帮助.
我之前问了一个类似的问题,但我找不到任何可以帮助我的东西.我现在已经更新了我的代码,但我现在完全卡住了.
这是我的PHP代码:
class person {
public $name;
public $SE;
private $SD;
function __construct ( $n, $s1, $s2 ) {
$this->name = $n;
$this->SE = $s1;
$this->SD = $s2;
}
}
$Obj = new person ( "ExampleName", 5, 5 );
Run Code Online (Sandbox Code Playgroud)
我需要为每个人创建单独的div,在这些div中包含他们的名字.我的主要问题是,在创建这些div之后,我需要以特定的方式对它们进行排序(这对你来说并不重要),这需要每个div都有一个ID与创建div的原始人相关联.
我能够从名单列表中创建div,但不能从对象创建div.所以:
我需要一种方法来使用foreach循环来根据每个对象(人)创建div.
我需要与这个人相关联的(与之相关的)div.
谢谢你的帮助