inline-block

inline-block causes the element to flows on the page in the same way inline elements do, e.g. text, img elements, etc. In many ways thing of the element as a next text character in a line of test, it will be handled in the same way. Good for Element expands as needed to fit the […]

Read More

import

Import another css file @import rule must be before all other rules, but after any @charset declarations. @import supports media queries, so you can allow the import to be media-dependent.

Read More

Search array

Does value exist in array in_array() checks if the specified value exits in the array. <<Best for value matching test array_search() searches an array for a given value and returns the key, or False Note that in_array() is the better choice if you are value matching within an array, because you can test for a […]

Read More

Multidimensional arrays

Two Dimension Arrays PHP arrays can contain a different array in any index, so you can create arrays as nested as you like! You can carry on creating arrays within arrays if desired. Accessing Array Values Creating a multidimensional array Example 1 Example 2 Example 3 Does a field value exist within a multi dimensional […]

Read More

htaccess

From v3.0.0 onwards, Amazon changed their Elastic Beanstalk PHP Platforms to use nginx as their server instead of Apache. So htaccess rule no longer work https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.migration-al.html

Read More

Array issues

json stored within json fields When you decode remember that you will need to decode the nested json field as a separate decode operation, you won’t get a single array which automatically nests the sub json.

Read More

Rounding values

Rounding value correctly intval() does not round values correctly!!!!As for C++, it simply converts to int and ignores decimal places. If you want a source value of say 5.6 to be converted to an integer of 6 and not 5, then use: Round down Round Up Round to a specific number of decimal places Value […]

Read More