Skip to content

Tag: php

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)…

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

how to install ioncube loader?

I recieved this error: Site error: the file C:wampwwwhtmlnews.php requires the ionCube PHP Loader ioncube_loader_win_5.1.dll to be installed by the site administrator. Then I have obtained the proper file and pasted it in the HTML folder. Nothing has changed. What should I do? Answer You need to download DLL …

Login redirect Issue in post comment area in PHP

If someone wishes to comment on any item e.g. and article or forum item, etc. on my site. It prompts them to login/create account. Is it possible to make sure that when the client logs in it takes them back to the comment they wanted to make? But now it’s going not like this flow. The user not logging i…