Answer the question
In order to leave comments, you need to log in
Is it appropriate to use time concatenation ( mktime() ) and auto increment to get a unique id?
if I write elements with id obtained in this way to the database, will there be any pitfalls in the future?
<?php $id=0; ?>
<?foreach($data as $k=>$v):?>
<div id="<?=$id++ . mktime()?>">
Текст который нужно записать в базу, у него есть уникальный id
</div>
<a id="<?=$id . mktime()?>" href="<?=$v?>"><?=$k?></a>
<?endforeach?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question