Answer the question
In order to leave comments, you need to log in
Display different text when a new user enters the site?
The task is this, there is a phone field in the product card, you need to conditionally set 10 numbers that will be displayed in a circle when the user opens the page. Well, that is, I went to the site, for example, the number is
+7923000000 Someone else went into the same product, his number is +7923111111, etc.
Answer the question
In order to leave comments, you need to log in
<?php
$phone_nums = [
'+7923000001',
'+7923000002',
'+7923000003',
'+7923000004',
'+7923000005',
];
$rand_phone = $phone_nums[array_rand($phone_nums)];
echo $rand_phone;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question