Skip to content

use font in mPDF generated document

I would like you to help me with this issue, I’m dealing for the first time with mPDF which I think it’s great, but I want to display the report with the same type of font as my web, which on its documentations explains how to achieve this, but it doesn’t still seems to work for me. What I d…

XAMPP PHP date function time is different from local machine time

My computer local time is 12-03-2013 4:30pm. My XAMPP date function prints the time as 12-03-2013 10:49:56. How can I set the XAMPP server time to display the system time? Answer Go to C:xamppphpphp.ini, or your custom path where php.ini is, open it. Look for the following: date.timezone = “Europe/Warsa…

Gettext or database translation

Which is better: gettext custom MySQL+cache based functionality Gettext is a sort of builtin feature, so I assume it’s tweaked for performance. Using poedit is a pain and impossible to show to any client. A custom functionality allows for simple translation interface. But might be heavy on php/db usage.…

PHP Classes: Should I use 2 classes or 1?

I am currently trying to make a class that deals with a survey in PHP (Drupal). So far I have this: This is great, I can create a new instance of Survey, set the properties, and call save on it. However, I also want to be able to have methods that retrieve the results of these surveys from the DB

Add radio button selection to database via ajax?

When I test my form it adds data successfully to my database table but the radio button selection is always “Ungrouped” which is the first radio button in the group. I tried giving them separate id’s, but in my ajax.js file my function uses this: Which means that now I am calling an id that …

Why is ${0x0} correct?

The following code is working perfectly: But I can’t figure out why. 0x0 (or 0, as non-hex people call it) is a random container, it could have been any number, but php variables can’t start with a number. What’s so special about the { } used here, and what are their limitations ? Answer Fir…