Skip to content

How to exclude identical elements from the foreach?

Tell me pls, how to exclude identical elements from the foreach? Code: Result: mail_1@test.com Post1 mail_1@test.com Post2 mail_2@test.com Post3 mail_3@test.com Post5 mail_2@test.com Post4 As needed: mail_1@test.com Post1 Post2 mail_2@test.com Post3 Post4 mail_3@test.com Post5 Answer Without knowing all detai…

Not found route in Laravel 7

Making a website on Laravel 7.28. Added a route to ‘routes/web.php’: The controller is created in ‘appHttpControllersLKIndexController.php’. It has a method: Created promoter file ‘resourcesviewslkindex.blade.php’. When I’m trying to follow the route http://127.0.0.1:…

Passing values while using php curl

I am trying to request an API which has the following details: Request Headers: Content-Type: application/x-www-form-urlencoded apikey: {{Your API Key}} Request Body: “channel” : “…

Leetcode linked list detect cycle – PHP

I am looking to find a way to detect cycle in linked list using Array in PHP. Please note I am aware of two pointer approach but I am keen on understanding approach if it is feasible to achieve this …

get users that did not buy a product

I have three tables users table products table users_buy table I want to get users who did not buy a specific product for example, user number 20 bought 5 product with ids [1,2,3,4,5] and user number 19 bought 3 product with ids [1,2,3] And user number 18 bought 2 product with ids [1,3] I want to get users wh…