Skip to content

Converting a database result of 3 columns to associative array

I have a MySQL query that returns the following result: I need to loop through the result and create a new associative array where the key is the ApptTime and the value is the combination of ApptType and Count like so: I’ve tried looping through the mysqli_fetch_assoc result in a variety of ways and cre…

JsPDF scale to size?

I currently have the following issue: I have a specific DIV container that I want to generate a PDF file from. I’m using the HTML2PDF.JS scripts from ekoopmans (https://www.npmjs.com/package/html2pdf.js/v/0.9.0) The only thing is, I want it to look like a regular print. Print view: https://i.stack.imgur…

Can’t debug with Symfony CLI / Xdebug

I am running my server with symfony server:start command and I would like to debug it as usual with PHP remote debug provided by PhpStorm. I’ve configured my Xdebug with these: I have installed the debugtool for my browser and configured my server in the PHP remote debug window. When I’m trying to…

Not being redirected to a page after destroying session in php

I am having an issue when it comes to redirection. What I have done is a var dump to see the values for $_SESSION[reset-password-page]. I can see when I am on a previous page and submit a form, the $_SESSION[reset-password-page] is set to reset-password, which is great it’s what I want. Now I what I try…

.htaccess redirect /subpage/ to /subpage?/wp-login

Trying to use .htaccess rule to do the wp-login JS check on first visit by appending ?/wp-login to the url since it’s interferring with Sucuri firewall when using password protection. I’ve created a test subdomain to try to get the htaccess redirect to work before using it on the live site: view h…

Laravel localization in routes without prefix

I have a Laravel app in 9 difference languages: I’m trying to set up localized URL’s like: All content on the website is displayed in the correct language but routing returns 404 pages except for default fallback language. My web.php My locale middleware: Using the fallback language URLs in produc…