Skip to content

PHP issue about sending mail message

I am having an issue when sending e-mail using php code. I have a form which sends an attachment to a folder and the name of the attachment to the database, in order to then send the link of the file inside the message. The problem is that the file and all the rest go the way it should but

How to bold a variable?

How can I have text within a php variable be bold?? function show_balance_header ($balance, $currency) { (string)$display_output = null; $display_output = fees_main::display_amount(abs($…

How to determine max length of a certain array column?

The array looks like this: Can I determine the longest string length of the 3rd column, without having to iterate over the array? In my example the longest string would be “FooBar” – 6 chars. If the inner array had only the string element, I could do max(array_map(‘strlen’, $arr)…

array_unique for multidimensional arrays

In case of one-dim array I can use array_unique to get unique entries. But which function should be used to work with two-dim arrays? For instance: Array[0][0] = ‘123’; Array[0][1] = ‘aaa’; Array[1][…

Can I get the value of a private property with Reflection?

It doesn’t seem to work: It gets into the IF loop, and then throws an error: Property privateProperty does not exist 😐 $ref = new ReflectionProperty($obj, ‘privateProperty’) doesn’t work either… The documentation page lists a few constants, including IS_PRIVATE. How can I ever us…

Zip files contain same files but have different hashes?

I have created hundreds of folders and text files using php, I then add them to a zip archive. This all works fine but if I create another zip archive using the same folders and files, the new archive will have a different hash to the first one. This is the same if I use winrar instead of php to