How can I sort multidimensional array in numeric order first and then in alphabetical order in PHP. I have one array : { “id”: “220”, “pin_list”: [ { …
Need assistance with regular expression [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I have many strings enclosed within a function called trans. In some places it could be trans(‘Hello’) or trans(“Hello”) I
Laravel store Files from API with specific folder creation
My goal is create Laravel API to store Files, from VSTO POST request. But first need figure out how create unigue folders in laravel where to file store. From VSTO sending POST with File and parameter id_message. How to set Laravel Controller to store file as storage/app/MyFiles/{id_message}/file, and parametr id_message wile file_path save to database table ? FileController Update for
Laravel if statement in query
I am beginner php developer. I have this code: I have error: “message”: “SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘== 1), client_company_infos.name, concat(client_infos.first_name, ” “, client_i’ at line 1 (SQL: select clients.*, if((client_company_infos.name !=
Session gets destroyed after page refresh
Login.php Index.php I made a Login script which opens, if the password is correct, the Index.php site. When first opening the Index.php site via the Login script everything works fine and the session is set. But after I refresh the page the sessions gets destroyed and is not set. So how can I save the session, so it’s not getting
Notice: Trying to access array offset on value of type null in C:xampphtdocsresindex.php on line 97 name:
I’ve created student result portal. It must display the student’s name and marks if the roll number and date of birth matches the data on database. Successfully, it displays the student’s mark details. But it shows error when displaying the student’s name. Below is the error. what I’ve to do now? Notice: Trying to access array offset on value of
How to save PHP session after browse closing? (without separate cookies)
There are a lot of Stack Overflow questions which advise using separate cookies to keep session parameters, but I don’t want to store any additional cookies on the client side. At the moment I have a new session with empty session parameters after each browser restart. Is there any way to keep the PHP session active after each browser restart?
How to retrieve data from multiple tables in MySQL and PHP? [closed]
TLDR: Please point me to the SIMPLEST tutorial for my problem. I have read many tutorials but all they did was confuse me more. I have three tables. students (has a row of id and name) courses (has a …
Search for an item in inner array
I have an assoc array looking like this (the data comes from user input, this is just an example) How would I look for a specific startingDate for example if I don’t want to loop over every ID. Basically I’m looking for a way to do something like $eventDates[*][“startingDate”] Answer You can achieve this a few different ways, one being
Count how many times something was echoed in a range?
I’m just a little stumped, I have a simple range of 1-20 listed out, and displays as follows, showing multiples of 3 within a range, and multiples of 5 within a range. These were displayed with …