I have some WordPress nav menus and I want to print each nav menu under an <a> tag. I tried the following code: Tried to use <a> as the container, but that’s printing: I want to remove that entire <ul><li> structure. My menu should be printed as: I’ve also tried the following, wh…
PHP Combine arrays with the same ID
I have $row which outputs the below. Array 0 – 4 do not change per user but the last items in each array need to be added together. I need to combine them so they are like this: My code so far is: But this is not doing what I expect. Not really sure where to go with this so
Loop through array, compare values with object values and define a new array, based on those values
I have images saved in db and on server. I have to get images from db and compare them with those on server. If match, then show images (make new array with matched image names and fetch them in browser) Example: $db_image_array $serverFolderArray My first try was this code: } there was also a second try with…
Zammad API: Create ticket with tag
For those who don’t want to read the whole question: I’m looking for the index in the API-Request (Zammad) to set a tag while creating a ticket. Details: I’m using PHP to make an API-Request to my server where Zammad is installed. The following shows the data i sent via curl: After convertin…
Send data that has nothing to do with button to modal using AJAX
I have this Ajax function: It takes this button properties(value and id) and sends them to the modal via post: Now, I need to take a data that has nothing to do with the button ($row[‘nomeDepartamento’];): and send it via the same ajax function to the modal. How would I do this? Thank you! Answer …
php echo each unique sql order by
From a db table I query all the results and order those by place. I echo this query into checkboxes. So every place has its own checkbox. Above all the checkboxes there is a title like select one or multiple places but now I would also like to add a title to each set of places. I have the following
Laravel AUTH() – Adding additional users (without registration)
I’ve tried to find information on this and can’t find any. I have a Laravel 7 application and have used the Laravel AUTH scaffolding for login/registration/authentication. I would like to allow a …
Why isn’t InteractiveLoginEvent not fired with Symfony’s 5.1 new security system?
With the new Symfony 5.1 security system, I’m not able to fire the InteractiveLoginEvent. I followed the configuration in the official documentation (here and here) and the system was working …
Can’t connect to localhost mysql
I am trying to get my app working with docker but I am having trouble getting my database to display. It seems my laravel application itself can access it but I need to access it myself in order to …
Laravel: How to separate array from query result into variables?
I have something like this: How to separate the ‘column’ and ‘count’ into variables? Answer Use native PHP functions; array_keys and array_values. For more details, read the below links; https://www.php.net/manual/en/function.array-keys.php https://www.php.net/manual/en/function.array-…