Skip to content

Tag: php

What is a PHP code generator?

I’m thinking of using a php cms, a php framework or php code generator. A php cms is restricted somehow and with a php framework and a php code generator I have more freedom. But what exactly is the difference between a framework and a code generator or what do a framework share with a code generator? I…

Storing application permissions in a database

I’m developing an application for our company that eventually will have lots of ways of restricting users to particular sections/modules. While the application is still small, I’d like to move to a new method of storing permissions that, as the application grows, will remain easy to maintain and q…

php: the best way to check if string ends with an element from array?

What’s the best way to check if $str1 ends with some string from $arr1? The answer true/false is great, although knowing the number of $arr1 element as an answer (if true) would be great. Example: Is there any better/faster/special way than just comparing in for-statement all elements of $arr1 with the …